-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disallow bare
ParamSpec
in type aliases (#18174)
Emit errors for both of the following aliases: ```python P = ParamSpec("P") Bad1: TypeAlias = P Bad2: TypeAlias = Concatenate[int, P] ``` This is done by swapping a top-level call to `type.accept(analyzer)` with `analyzer.anal_type(type)`, the latter of which simply calls the former and then performs some checks.
- Loading branch information
1 parent
21587f0
commit eec8071
Showing
2 changed files
with
12 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters