nodes: avoid needing to expose NodeKeywords for typing
It adds no value over exporting just the ABC so do that to reduce the API surface.
This commit is contained in:
parent
d8d2df7e6f
commit
6d3a66d947
|
@ -1,10 +1,12 @@
|
|||
import os
|
||||
import warnings
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from typing import Callable
|
||||
from typing import Iterable
|
||||
from typing import Iterator
|
||||
from typing import List
|
||||
from typing import MutableMapping
|
||||
from typing import Optional
|
||||
from typing import overload
|
||||
from typing import Set
|
||||
|
@ -148,8 +150,9 @@ class Node(metaclass=NodeMeta):
|
|||
#: Filesystem path where this node was collected from (can be None).
|
||||
self.fspath = fspath or getattr(parent, "fspath", None)
|
||||
|
||||
# The explicit annotation is to avoid publicly exposing NodeKeywords.
|
||||
#: Keywords/markers collected from all scopes.
|
||||
self.keywords = NodeKeywords(self)
|
||||
self.keywords: MutableMapping[str, Any] = NodeKeywords(self)
|
||||
|
||||
#: The marker objects belonging to this node.
|
||||
self.own_markers: List[Mark] = []
|
||||
|
|
Loading…
Reference in New Issue