Skip to content

Conversation

@carljm
Copy link
Contributor

@carljm carljm commented Nov 27, 2025

Fixes astral-sh/ty#1649

Summary

We missed this when adding support for type[] of a specialized generic.

Test Plan

Added mdtests.

@carljm carljm added the ty Multi-file analysis & type inference label Nov 27, 2025
@carljm carljm changed the base branch from main to cjm/failedspec November 27, 2025 01:34
@astral-sh-bot
Copy link

astral-sh-bot bot commented Nov 27, 2025

Diagnostic diff on typing conformance tests

No changes detected when running ty on typing conformance tests ✅

@astral-sh-bot
Copy link

astral-sh-bot bot commented Nov 27, 2025

mypy_primer results

Changes were detected when running on open source projects
beartype (https://github.com/beartype/beartype)
- beartype/claw/_package/clawpkgtrie.py:66:29: warning[unsupported-base] Unsupported class base with type `<class 'dict[str, PackagesTrieBlacklist]'> | <class 'dict[str, Divergent]'>`
- beartype/claw/_package/clawpkgtrie.py:247:29: warning[unsupported-base] Unsupported class base with type `<class 'dict[str, PackagesTrieWhitelist]'> | <class 'dict[str, Divergent]'>`
- Found 498 diagnostics
+ Found 496 diagnostics

mypy (https://github.com/python/mypy)
- mypy/typeshed/stdlib/collections/__init__.pyi:43:22: error[invalid-type-arguments] Too many type arguments to class `tuple`: expected 1, got 2
- Found 1781 diagnostics
+ Found 1780 diagnostics

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- src/scikit_build_core/_logging.py:153:13: warning[unsupported-base] Unsupported class base with type `<class 'Mapping[str, Style]'> | <class 'Mapping[str, Divergent]'>`
- Found 45 diagnostics
+ Found 44 diagnostics

scipy-stubs (https://github.com/scipy/scipy-stubs)
- scipy-stubs/_lib/_bunch.pyi:6:22: error[invalid-type-arguments] Too many type arguments to class `tuple`: expected 1, got 2
- Found 1972 diagnostics
+ Found 1971 diagnostics

No memory usage changes detected ✅

@carljm carljm marked this pull request as ready for review November 27, 2025 01:43
@astral-sh-bot

This comment was marked as off-topic.

@ibraheemdev
Copy link
Member

Was just about to comment about the typing conformance changes being identical to #21652.. but then I realized this PR was stacked on that one 😄

Base automatically changed from cjm/failedspec to main November 27, 2025 12:44
@AlexWaygood
Copy link
Member

oops, I think I just accidentally left some review comments regarding changes that already landed in 77f8fa6 (I guess this needs to be rebased now that's landed 😄)

@astral-sh-bot
Copy link

astral-sh-bot bot commented Dec 1, 2025

ecosystem-analyzer results

Lint rule Added Removed Changed
invalid-type-arguments 0 2 0
unsupported-base 2 0 0
unused-ignore-comment 1 0 0
Total 3 2 0

Full report with detailed diff (timing results)

@sharkdp sharkdp closed this Dec 1, 2025
@sharkdp sharkdp reopened this Dec 1, 2025
@sharkdp
Copy link
Contributor

sharkdp commented Dec 1, 2025

Re-running the ecosystem checks to pick up the changes in #21721.

@sharkdp sharkdp merged commit c2773b4 into main Dec 1, 2025
83 checks passed
@sharkdp sharkdp deleted the cjm/typetuple branch December 1, 2025 10:49
@carljm
Copy link
Contributor Author

carljm commented Dec 1, 2025

Thanks for updating and landing this and the previous PR in stack @sharkdp !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ecosystem-analyzer ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Too many arguments for type[tuple[Any, ...]]

5 participants