10000 Backports for 1.11.2 by mr-c · Pull Request #17675 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Backports for 1.11.2 #17675

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

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

10000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "Fix RawExpressionType.accept crash with `--cache-fine-grain…
…ed`" (#17637)

Reverts #17588
  • Loading branch information
ilevkivskyi authored and mr-c committed Aug 14, 2024
commit 222c80926eb96557c7869766137b043d34e7bd0c
2 changes: 0 additions & 2 deletions mypy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -2734,8 +2734,6 @@ def simple_name(self) -> str:
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
Expand Down
12 changes: 0 additions & 12 deletions test-data/unit/check-typeddict.test
Original file line number Diff line number Diff line change
Expand Up @@ -1442,18 +1442,6 @@ reveal_type(x) # N: Revealed type is "TypedDict('__main__.X', {'a': TypedDict('_
reveal_type(x['a']['b']) # N: Revealed type is "builtins.int"
[builtins fixtures/dict.pyi]

[case testTypedDictForwardReferenceCacheFineGrained]
# flags: --cache-fine-grained
from mypy_extensions import TypedDict
class A(TypedDict):
b: "B"
class B(TypedDict):
c: "C"
class C(TypedDict):
d: "D"
class D:
pass

[case testSelfRecursiveTypedDictInheriting]
from mypy_extensions import TypedDict

Expand Down
Loading
0