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

[Stylistic] Enforce a space after # pyright:, # mypy: and # noqa: comments #465

Open
Avasam opened this issue Feb 29, 2024 · 5 comments
Open

Comments

@Avasam
Copy link
Contributor

Avasam commented Feb 29, 2024

This comes from python/typeshed#11497 (comment)
# pyright:ignore --> # pyright: ignore
# type:ignore --> # type: ignore
# noqa:Y011 --> # noqa: Y011

This could probably be generalised further, but would likely fall out of scope of flake8-pyi

Formatters (black and Ruff) already take of adding a space after #

@JelleZijlstra
Copy link
Collaborator

I feel this is a better fit for Ruff, I'm about to open an issue there.

@Avasam
Copy link
Contributor Author

Avasam commented Feb 29, 2024

Already did astral-sh/ruff#10160 but feel free to reformulate

@JelleZijlstra
Copy link
Collaborator

Oh, looks good, thanks! I feel the value of this rule isn't high enough without an autofix so I feel it's probably not worth doing in flake8-pyi.

@Avasam
Copy link
Contributor Author

Avasam commented Feb 29, 2024

That's fair. If Ruff maintainers show interest in the request I think you can immediatly close this issue.
I see it as at least doing my due diligence "shopping around" for linters.

@AlexWaygood
Copy link
Collaborator

I'm a ruff maintainer now and I'm interested in this rule 😄 (but I can't speak for the rest of the ruff team)

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

No branches or pull requests

3 participants