-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Another AssertionError with TypedDict and --cache-fine-grained in v1.11.0 #17587
Labels
Comments
andersk
added a commit
to andersk/mypy
that referenced
this issue
Jul 26, 2024
Fixes python#17587. Signed-off-by: Anders Kaseorg <[email protected]>
andersk
added a commit
to andersk/mypy
that referenced
this issue
Jul 26, 2024
Commit 1072c78 (python#17148) converted all quoted types into RawExpressionType, which raised an AssertionError when accepting a TypeTriggersVisitor. Fixes python#17587. Signed-off-by: Anders Kaseorg <[email protected]>
Is this the right fix or is something deeper going on? --- a/mypy/types.py
+++ b/mypy/types.py
@@ -2705,6 +2705,8 @@ class RawExpressionType(ProperType):
return self.base_type_name.replace("builtins.", "")
def accept(self, visitor: TypeVisitor[T]) -> T:
+ if self.node is not None:
+ return self.node.accept(visitor)
assert isinstance(visitor, SyntheticTypeVisitor)
ret: T = visitor.visit_raw_expression_type(self)
return ret |
hauntsaninja
pushed a commit
that referenced
this issue
Jul 27, 2024
) Commit 1072c78 (#17148) converted all quoted types into `RawExpressionType`, which raised an `AssertionError` when `accept`ing a `TypeTriggersVisitor`. - Fixes #17574. - Fixes #17587. Signed-off-by: Anders Kaseorg <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
dmypy
crashes onimport stripe
, and I reduced the failure to the minimal test case below with no external dependencies. This is similar tobut it remains a problem on current
master
(e67decb) even after #17515 was marked fixed. This is a regression in v1.11.0, andgit bisect
shows it was introduced by 1072c78 (#17148, cc @JelleZijlstra).test.py
The text was updated successfully, but these errors were encountered: