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

Prevent TypeGuardedType leak fromnarrow_declared_type as part of typevar bound#20046

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

Merged

Conversation

@sterliakov
Copy link
Collaborator

Fixes#20015, refs#18895 as a previous example of the same issue. I don't see any similar problems in other branches.

@github-actions
Copy link
Contributor

Diff frommypy_primer, showing the effect of this PR on open source code:

steam.py (https://github.com/Gobot1234/steam.py)- steam/ext/commands/commands.py:285: error: Incompatible types in assignment (expression has type "GroupMixin[Any | None] | Group[Any, [VarArg(Any), KwArg(Any)], Any] | None", variable has type "Self")  [assignment]+ steam/ext/commands/commands.py:285: error: Incompatible types in assignment (expression has type "GroupMixin[Any | None] | Group[CogT, [VarArg(Any), KwArg(Any)], Any] | None", variable has type "Self")  [assignment]scikit-build-core (https://github.com/scikit-build/scikit-build-core)+ src/scikit_build_core/metadata/__init__.py:82: error: Argument 1 has incompatible type "Union[str, dict[str, str]]"; expected "str"  [arg-type]+ src/scikit_build_core/metadata/__init__.py:82: note: Error code "arg-type" not covered by "type: ignore" comment+ src/scikit_build_core/metadata/__init__.py:89: error: Argument 1 has incompatible type "Union[str, list[str], dict[str, str]]"; expected "str"  [arg-type]+ src/scikit_build_core/metadata/__init__.py:89: note: Error code "arg-type" not covered by "type: ignore" comment+ src/scikit_build_core/metadata/__init__.py:94: error: Item "str" of "Union[str, dict[str, str]]" has no attribute "items"  [union-attr]+ src/scikit_build_core/metadata/__init__.py:98: error: Item "str" of "Union[str, dict[str, str]]" has no attribute "items"  [union-attr]+ src/scikit_build_core/metadata/__init__.py:98: note: Error code "union-attr" not covered by "type: ignore" comment+ src/scikit_build_core/metadata/__init__.py:102: error: Left operand of "and" is always true  [redundant-expr]+ src/scikit_build_core/metadata/__init__.py:108: error: Item "str" of "Union[str, list[str], dict[str, str]]" has no attribute "items"  [union-attr]+ src/scikit_build_core/metadata/__init__.py:108: error: Item "list[str]" of "Union[str, list[str], dict[str, str]]" has no attribute "items"  [union-attr]

@sterliakov
Copy link
CollaboratorAuthor

Allscikit_build_core errors are correct, both arg-type and return-value should be there.

@sterliakovsterliakov marked this pull request as ready for reviewOctober 10, 2025 23:36
Copy link
Member

@ilevkivskyiilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LG, thanks!

@ilevkivskyiilevkivskyi merged commit6aa44da intopython:masterOct 12, 2025
20 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ilevkivskyiilevkivskyiilevkivskyi approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

NotImplementedError: Cannot serialize TypeGuardedType instance

2 participants

@sterliakov@ilevkivskyi

[8]ページ先頭

©2009-2025 Movatter.jp