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

Potential conflict S603 and unused noqa directive in 0.5.0 version #12184

Closed
shaneahmed opened this issue Jul 4, 2024 · 2 comments
Closed

Potential conflict S603 and unused noqa directive in 0.5.0 version #12184

shaneahmed opened this issue Jul 4, 2024 · 2 comments
Labels
question Asking for support or clarification

Comments

@shaneahmed
Copy link

shaneahmed commented Jul 4, 2024

Upgrade to 0.5.0 removes # noqa: S603 during formatting as an unused noqa directive but then generates S603 error.

For example, in https://github.com/TissueImageAnalytics/tiatoolbox/pull/829/files ruff removes # noqa: S603 as an unused noqa directive` but then fails due to S603 error.

@MichaReiser MichaReiser added the question Asking for support or clarification label Jul 4, 2024
@MichaReiser
Copy link
Member

Hi @shaneahmed

The last release changed (breaking) the range of some flake8-bandit rules (changelog, PR). This will mean that existing noqa comments need to be moved. I'm sorry that this is causing you extra work. I believe Ruff can do it automatically for you when using ruff check --extend-select=RUF100 --fix to remove the unused noqa comments and then use ruff check --add-noqa --select=S to add the noqa comments for the flake8-bandit rules.

@shaneahmed
Copy link
Author

Many thanks @MichaReiser . It helped!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for support or clarification
Projects
None yet
Development

No branches or pull requests

2 participants