Implement B014 from flake8-bugbear (#392)

This commit is contained in:
Charlie Marsh 2022-10-10 12:53:42 -04:00 committed by GitHub
parent c384fa513b
commit 35f593846e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 226 additions and 166 deletions

View file

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