Skip to content

Commit

Permalink
fixup! Turn keywords into a property
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed committed Oct 13, 2020
1 parent 9f00071 commit d6863ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/_pytest/python.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
from _pytest.mark.structures import get_unpacked_marks
from _pytest.mark.structures import Mark
from _pytest.mark.structures import normalize_mark_list
from _pytest.nodes import NodeKeywords
from _pytest.outcomes import fail
from _pytest.outcomes import skip
from _pytest.pathlib import parts
Expand Down Expand Up @@ -272,7 +271,7 @@ class PyobjMixin(PyobjContext):

# Function and attributes that the mixin needs (for type-checking only).
if TYPE_CHECKING:
_keywords = None # type: Optional[NodeKeywords]
_keywords = None # type: Optional[nodes.NodeKeywords]
_own_markers = ([], []) # type: Tuple[List[Mark], List[Mark]]

@property
Expand Down Expand Up @@ -1473,7 +1472,7 @@ def own_markers(self) -> List[Mark]:
return self._own_markers[0] + self._obj_markers + self._own_markers[1]

@property
def keywords(self) -> NodeKeywords:
def keywords(self) -> "nodes.NodeKeywords":
if self._keywords is not None:
return self._keywords

Expand Down

0 comments on commit d6863ed

Please sign in to comment.