Skip to content

Conversation

@hunterhogan
Copy link
Contributor

Pyright no longer complains about recursive definitions for variables named pattern, so the _Pattern alias is no longer needed.

(.venv) C:\clones\typeshed>pip list
Package           Version
----------------- -------
nodeenv           1.9.1
pip               25.0.1
pyright           1.1.400
typing_extensions 4.13.2

(.venv) C:\clones\typeshed>pyright stdlib\ast.pyi --pythonversion 3.9
0 errors, 0 warnings, 0 informations 

(.venv) C:\clones\typeshed>pyright stdlib\ast.pyi --pythonversion 3.10
0 errors, 0 warnings, 0 informations 

(.venv) C:\clones\typeshed>pyright stdlib\ast.pyi --pythonversion 3.11
0 errors, 0 warnings, 0 informations 

(.venv) C:\clones\typeshed>pyright stdlib\ast.pyi --pythonversion 3.12
0 errors, 0 warnings, 0 informations 

(.venv) C:\clones\typeshed>pyright stdlib\ast.pyi --pythonversion 3.13
0 errors, 0 warnings, 0 informations 

(.venv) C:\clones\typeshed>pyright stdlib\ast.pyi --pythonversion 3.14
0 errors, 0 warnings, 0 informations 

Pyright no longer complains about recursive definitions for variables named pattern, so the _Pattern alias is no longer needed.
@JelleZijlstra
Copy link
Member

CI disagrees. If the name pattern is declared in a class scope, then usages of that name refer to the name pattern. We still need the workaround.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants