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

Unnecessary-parenthesis only catches a single error per line #119

Open
A5rocks opened this issue Sep 16, 2024 · 1 comment · May be fixed by #121
Open

Unnecessary-parenthesis only catches a single error per line #119

A5rocks opened this issue Sep 16, 2024 · 1 comment · May be fixed by #121

Comments

@A5rocks
Copy link

A5rocks commented Sep 16, 2024

A few other rules do this too (like check_missing_colon_in_role), but take unnecessary-parenthesis as an example: because unnecessary-parenthesis runs a regex that catches a single instance, it will only catch a single instance per line.

This isn't a bug, but still makes it annoying to fix issues as things pop up one after another. Feel free to close this though.

I'd be happy to contribute this if this is something to be fixed.

@AlexWaygood
Copy link
Collaborator

AlexWaygood commented Sep 17, 2024

I'd be willing to accept a fix for this, but it also sounds like the kind of thing that could lead to a big performance regression if done in a suboptimal way, so I'd definitely like to keep an eye on that. (sphinx-lint is one of the slowest tools in CPython's pre-commit setup, so I wouldn't want it getting slower!)

@A5rocks A5rocks linked a pull request Sep 18, 2024 that will close this issue
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 a pull request may close this issue.

2 participants