-
-
Notifications
You must be signed in to change notification settings - Fork 293
Fix another non module root #2744
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4963,9 +4963,9 @@ class Unknown(_base_nodes.AssignTypeNode): | |
|
||
def __init__( | ||
self, | ||
parent: NodeNG, | ||
lineno: None = None, | ||
col_offset: None = None, | ||
parent: None = None, | ||
*, | ||
Comment on lines
4964
to
4969
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we consider this a breaking change ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You are right, it is. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the procedure for handling this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll wait for 4.0 to release it, and in astroid we just add a mildly strongly worded changelog entry. Or maybe we're not going to, I'm sure @DanielNoord will have an opinion about it :) |
||
end_lineno: None = None, | ||
end_col_offset: None = None, | ||
|
@@ -4986,6 +4986,9 @@ def _infer(self, context: InferenceContext | None = None, **kwargs): | |
yield util.Uninferable | ||
|
||
|
||
UNATTACHED_UNKNOWN = Unknown(parent=SYNTHETIC_ROOT) | ||
|
||
|
||
class EvaluatedObject(NodeNG): | ||
"""Contains an object that has already been inferred | ||
|
||
|
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.
Nice catch, strange that this typo was not a problem anywhere.
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.
My local checker (not mypy, pyright) found other typing issues in that file. Maybe mypy isn't running on this file for whatever reason.
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, mypy doesn't run on a lot of file at the moment. Lots of dynamic things that are very hard to type. I would have thought that actual import of something that does not exist would have been an error, but it seems it's not.
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 think it's due to
from __future__ import annotations
at the top. It makes python treat every annotation as a string. Without it, it would have been checked.