Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mypy/test/teststubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -850,11 +850,13 @@ def test_property(self) -> Iterator[Case]:
class Good:
@property
def read_only_attr(self) -> int: ...
read_only_attr_alias = read_only_attr
""",
runtime="""
class Good:
@property
def read_only_attr(self): return 1
read_only_attr_alias = read_only_attr
""",
error=None,
)
Expand Down Expand Up @@ -916,13 +918,15 @@ class Z:
def read_write_attr(self) -> int: ...
@read_write_attr.setter
def read_write_attr(self, val: int) -> None: ...
read_write_attr_alias = read_write_attr
""",
runtime="""
class Z:
@property
def read_write_attr(self): return self._val
@read_write_attr.setter
def read_write_attr(self, val): self._val = val
read_write_attr_alias = read_write_attr
""",
error=None,
)
Expand Down
Loading