diff --git a/crates/ruff_linter/src/rules/tryceratops/rules/try_consider_else.rs b/crates/ruff_linter/src/rules/tryceratops/rules/try_consider_else.rs index 60aa30e7ca..9783cacac0 100644 --- a/crates/ruff_linter/src/rules/tryceratops/rules/try_consider_else.rs +++ b/crates/ruff_linter/src/rules/tryceratops/rules/try_consider_else.rs @@ -25,7 +25,7 @@ use crate::checkers::ast::Checker; /// rec = 1 / n /// print(f"reciprocal of {n} is {rec}") /// return rec -/// except ZeroDivisionError as exc: +/// except ZeroDivisionError: /// logging.exception("Exception occurred") /// ``` /// @@ -37,7 +37,7 @@ use crate::checkers::ast::Checker; /// def reciprocal(n): /// try: /// rec = 1 / n -/// except ZeroDivisionError as exc: +/// except ZeroDivisionError: /// logging.exception("Exception occurred") /// else: /// print(f"reciprocal of {n} is {rec}")