-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[flake8-bandit
] Report all references to suspicious functions (S3
)
#15541
Conversation
|
code | total | + violation | - violation | + fix | - fix |
---|---|---|---|---|---|
S321 | 6 | 6 | 0 | 0 | 0 |
S307 | 1 | 1 | 0 | 0 | 0 |
S301 | 1 | 1 | 0 | 0 | 0 |
flake8-bandit
] Report all references (S3
)flake8-bandit
] Report all references to suspicious functions (S3
)
The ecosystem changes are mostly as expected, except for this: class FTPSHook(FTPHook):
def get_conn(self) -> ftplib.FTP:
# ^^^^^^^^^^ Should references in type hints be reported? |
crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs
Outdated
Show resolved
Hide resolved
crates/ruff_linter/src/rules/flake8_bandit/rules/suspicious_function_call.rs
Outdated
Show resolved
Hide resolved
I think we should ignore them which, I think, is what you've done as well in this PR. |
Updating the docs with the new preview behavior and then will merge. |
## Summary I noticed this while reviewing #15541 that the code inside the large closure cannot be formatted by the Rust formatter. This PR extracts the qualified name and inlines the match expression. ## Test Plan `cargo clippy` and `cargo insta`
Summary
Resolves #15522.
Test Plan
cargo nextest run
andcargo insta test
.