Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message when assigning to read-only property #4863

Merged
merged 1 commit into from Apr 5, 2018

Conversation

Projects
None yet
2 participants
@Michael0x2a
Copy link
Collaborator

Michael0x2a commented Apr 5, 2018

Fixes #4756

Consider the following program:

class Parent:
    @property
    def foobar(self) -> int: ...

class Child(Parent): pass

Child().foobar = 10

Previously, mypy would report that the property foobar was defined in 'Child'. Now, it correctly reports it was defined in 'Parent'.

Fix error message when assigning to read-only property
Fixes #4756

Consider the following program:

```python
class Parent:
    @Property
    def foobar(self) -> int: ...

class Child(Parent): pass

Child().foobar = 10
```

Previously, mypy would report that the property `foobar` was defined in
'Child'. Now, it correctly reports it was defined in 'Parent'.

@ilevkivskyi ilevkivskyi merged commit 3346cfa into python:master Apr 5, 2018

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Michael0x2a Michael0x2a deleted the Michael0x2a:fix-error-message-when-assigning-to-readonly-property branch Apr 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.