Skip to content

Commit 2b28b57

Browse files
committed
Add some consistency checks
1 parent c47837a commit 2b28b57

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mypy/nodes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,10 @@ def is_trivial_self(self) -> bool:
597597

598598
@property
599599
def setter(self) -> Decorator:
600+
# Do some consistency checks first.
601+
first_item = self.items[0]
602+
assert isinstance(first_item, Decorator)
603+
assert first_item.var.is_settable_property
600604
assert self.setter_index is not None
601605
item = self.items[self.setter_index]
602606
assert isinstance(item, Decorator)

0 commit comments

Comments
 (0)