Skip to content
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

Feature request: Support literal tuple syntax for Final tuple in stubs #1741

Open
Avasam opened this issue Aug 17, 2024 · 0 comments
Open

Feature request: Support literal tuple syntax for Final tuple in stubs #1741

Avasam opened this issue Aug 17, 2024 · 0 comments

Comments

@Avasam
Copy link

Avasam commented Aug 17, 2024

From python/typeshed@3bc7f60#diff-d1e77cc82cda219b4f7da638c57380483554bd836b0582eface5aab66c6ac699 (action results: https://github.com/python/typeshed/actions/runs/10434646856/job/28897746023?pr=12454)

The following:

SCHEME_KEYS: Final = ("purelib", "platlib", "headers", "scripts", "data")

Produces error: stdlib/distutils/command/register.pyi (3.11): ParseError: Default value for SCHEME_KEYS: typing.Final can only be '...' or a literal constant, got (LITERAL('purelib'), LITERAL('platlib'), LITERAL('headers'), LITERAL('scripts'), LITERAL('data'))

This is supported by mypy, pyright, and flake8-pyi .

@Avasam Avasam changed the title Feature request: Support literal tuple syntax for Final tuple Feature request: Support literal tuple syntax for Final tuple in stubs Aug 17, 2024
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

No branches or pull requests

1 participant