Skip to content

stubgen: fix missing property setter in semantic analysis mode#16303

Merged
JelleZijlstra merged 1 commit intopython:masterfrom
hamdanal:stubgen-property-setter
Oct 21, 2023
Merged

stubgen: fix missing property setter in semantic analysis mode#16303
JelleZijlstra merged 1 commit intopython:masterfrom
hamdanal:stubgen-property-setter

Conversation

@hamdanal
Copy link
Copy Markdown
Collaborator

The semantic analyzer treats properties as overloaded functions. This was previously ignored by stubgen but regressed in #15232.
This PR restores the original behavior.

Fixes #16300

The semantic analyzer treats properties as overloaded functions.
This was previously ignored by stubgen but regressed in python#15232.

Fixes python#16300
Comment thread mypy/stubutil.py
Comment on lines -672 to -673
print(self._all_)
print(self._toplevel_names)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These spurious prints are not related but they seem to be left here by mistake. They are polluting the stdout.
The blame points to #15770.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

@JelleZijlstra JelleZijlstra merged commit 27c4b46 into python:master Oct 21, 2023
@hamdanal hamdanal deleted the stubgen-property-setter branch October 21, 2023 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stubgen *.pyi not generated with "setter"

2 participants