Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix swapping TypeVars with defaults.#19449

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
randolf-scholz wants to merge4 commits intopython:master
base:master
Choose a base branch
Loading
fromrandolf-scholz:fix_typevar_default

Conversation

randolf-scholz
Copy link
Contributor

@randolf-scholzrandolf-scholz commentedJul 15, 2025
edited
Loading

Changed the logic for recursion guards ofTypeVarType: Instead of always substitutingrepl = repl.accept(self), and situationally updatingrepl.default = repl.default.accept(self) if the result is aTypeVarType, we now always updaterepl.default = repl.default.accept(self) a priori and then only choose the expandedrepl.accept(self) if the result is a concrete type.

PS: closed earlier PRs#19447, since it contained debugging changes and#19448 because it didn't solve#19362.

jorenham reacted with thumbs up emoji
@github-actionsGitHub Actions

This comment has been minimized.

@cdce8pcdce8p added the topic-pep-696TypeVar defaults labelJul 16, 2025
@github-actionsGitHub Actions
Copy link
Contributor

According tomypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
topic-pep-696TypeVar defaults
Projects
None yet
Milestone
No milestone
2 participants
@randolf-scholz@cdce8p

[8]ページ先頭

©2009-2025 Movatter.jp