-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Add shared checker interface to break import cycle #18878
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
Conversation
This comment has been minimized.
This comment has been minimized.
for more information, see https://pre-commit.ci
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just have questions about one change.
mypy/semanal.py
Outdated
isinstance(item, Decorator) and item.func.abstract_status == IS_ABSTRACT | ||
for item in defn.items | ||
): | ||
pass |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a behaviour change? If yes, maybe add a test, or would this be better included in a separate PR if mypyc doesn't support this yet?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I didn't want to add an implementation for couple overloaded methods with many parameters, but unfortunately it didn't work with mypyc. I will put it into a separate PR.
According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
The import cycle is not a real one as
if TYPE_CHECKING: ...
is used, but it would become much bigger if I start usingcheckmember
insubtypes
, essentially it would be one huge import cycle during self-checking. So I decided to do something similar we did for semantic analyzer.