Implement B025 from flake8-bugbear (#391)

This commit is contained in:
Charlie Marsh 2022-10-10 12:18:31 -04:00 committed by GitHub
parent 022ff64d29
commit c384fa513b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 317 additions and 37 deletions

View file

@ -822,6 +822,18 @@ mod tests {
Ok(())
}
#[test]
fn b025() -> Result<()> {
let mut checks = check_path(
Path::new("./resources/test/fixtures/B025.py"),
&settings::Settings::for_rule(CheckCode::B025),
&fixer::Mode::Generate,
)?;
checks.sort_by_key(|check| check.location);
insta::assert_yaml_snapshot!(checks);
Ok(())
}
#[test]
fn c400() -> Result<()> {
let mut checks = check_path(