8000 Keep `TypeVar` arguments when narrowing generic subclasses with `isinstance` and `issubclass`. by tyralla · Pull Request #17099 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Keep TypeVar arguments when narrowing generic subclasses with isinstance and issubclass. #17099

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

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
84e3837
Keep `TypeVar` arguments when narrowing generic subclasses with `isin…
tyralla Apr 4, 2024
dbcfa1c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 5, 2024
098e066
Remove a cast that is now redundant.
tyralla Apr 5, 2024
892c74f
fix: Remove a cast that is now redundant.
tyralla Apr 5, 2024
c24cc53
Use Unpack in testKeepTypeVarTupleArgsWhenNarrowingGenericsWithIsInst…
tyralla Apr 5, 2024
d013673
fix "local variable 'pos2' referenced before assignment"
tyralla Apr 5, 2024
fe51e85
Merge branch 'master' into feature/keep_type_var_args_when_narrowing_…
tyralla Apr 5, 2024
a94db4a
restart job
tyralla Apr 5, 2024
a700294
Revert "restart job"
tyralla Apr 5, 2024
73da8b6
remove empty line
tyralla Apr 5, 2024
325f190
avoid unnecessary union members when proposed type is current type (w…
tyralla Apr 5, 2024
bb63532
fix: avoid unnecessary union members when proposed type is current ty…
tyralla Apr 5, 2024
18bae83
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 5, 2024
afa5450
fix: avoid unnecessary union members when proposed type is current ty…
tyralla Apr 5, 2024
9769638
apply one more union flattening to avoid (good or bad?) changes in na…
tyralla Apr 6, 2024
6741175
fix: apply one more union flattening to avoid (good or bad?) changes …
tyralla Apr 6, 2024
463c7d4
Change test name testKeepTypeVarArgsWhenNarrowingGenericsWithIsInstan…
tyralla Apr 16, 2024
6195de1
special handling of TupleType
tyralla Apr 16, 2024
116b70e
restart Mypy primer
tyralla Apr 16, 2024
ac4b9dc
Revert "restart Mypy primer"
tyralla Apr 16, 2024
557bfe2
Merge branch 'master' into feature/keep_type_var_args_when_narrowing_…
hauntsaninja Nov 3, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert "restart job"
This reverts commit a94db4a.
  • Loading branch information
tyralla committed Apr 5, 2024
commit a700294c4d6771d0f55f61a5354514ae3f0e56eb
1 change: 0 additions & 1 deletion mypy/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7679,7 +7679,6 @@ def builtin_item_type(tp: Type) -> Type | None:
"_collections_abc.dict_keys",
"typing.KeysView",
]:
restart job
45F5 if not tp.args:
# TODO: fix tuple in lib-stub/builtins.pyi (it should be generic).
return None
Expand Down
0