diff --git a/README.md b/README.md index cf65be545d..e135e10b40 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ The 🛠 emoji indicates that a rule is automatically fixable by the `--fix` com | A002 | BuiltinArgumentShadowing | Argument `...` is shadowing a python builtin | | | | A003 | BuiltinAttributeShadowing | Class attribute `...` is shadowing a python builtin | | | | B011 | DoNotAssertFalse | Do not `assert False` (`python -O` removes these calls), raise `AssertionError()` | | 🛠 | -| B014 | DuplicateHandlerException | Exception handler with duplicate exception: `ValueError | | 🛠 | +| B014 | DuplicateHandlerException | Exception handler with duplicate exception: `ValueError` | | 🛠 | | B025 | DuplicateTryBlockException | try-except block with duplicate exception `Exception` | | | | C400 | UnnecessaryGeneratorList | Unnecessary generator - rewrite as a list comprehension | | | | C401 | UnnecessaryGeneratorSet | Unnecessary generator - rewrite as a set comprehension | | | diff --git a/src/checks.rs b/src/checks.rs index 57be7c65e8..a8415f909a 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -625,7 +625,7 @@ impl CheckKind { CheckKind::DuplicateHandlerException(names) => { if names.len() == 1 { let name = &names[0]; - format!("Exception handler with duplicate exception: `{name}") + format!("Exception handler with duplicate exception: `{name}`") } else { let names = names.iter().map(|name| format!("`{name}`")).join(", "); format!("Exception handler with duplicate exceptions: {names}")