-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
More tweaks to support mypyc #5513
Conversation
Apparently pytest does its own thing for importing and doesn't load the C extension versions
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.
LGTM, just a tiny suggestion.
mypy/checkexpr.py
Outdated
return UnionType([self.analyze_type_type_callee(item, context) | ||
for item in item.relevant_items()], item.line) | ||
return UnionType([self.analyze_type_type_callee(x, context) | ||
for x in item.relevant_items()], item.line) |
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.
I would use a bit more descriptive name like tp
instead of just x
.
@@ -191,7 +191,7 @@ def __init__(self) -> None: | |||
self.use_builtins_fixtures = False | |||
|
|||
# -- experimental options -- | |||
self.shadow_file = None # type: Optional[List[Tuple[str, str]]] | |||
self.shadow_file = None # type: Optional[List[List[str]]] |
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.
Hm, I am curious why mypy didn't catch any error about this?
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.
The field gets populated by argparse, I think?
No description provided.