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

Enforce PEP 570-style positional only syntax #173

Closed
srittau opened this issue Feb 2, 2022 · 1 comment · Fixed by #461
Closed

Enforce PEP 570-style positional only syntax #173

srittau opened this issue Feb 2, 2022 · 1 comment · Fixed by #461

Comments

@srittau
Copy link
Collaborator

srittau commented Feb 2, 2022

flake8-pyi should forbid old-style positional only syntax. I.e., instead of def foo(__bar): ... the following should be used: def foo(bar, /): ....

It's too early to implement this at this moment, but I opened this issue so we remember it. See python/typeshed#4972 for current type checker support.

@AlexWaygood
Copy link
Collaborator

I really wish we could implement this feature now ☹ I find the __ syntax incredibly ugly, and it made the stubs look so weird to me when I first started contributing to typeshed (just because of how different it looks to anything you see in normal Python).

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

Successfully merging a pull request may close this issue.

2 participants