mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:54:42 +00:00
Removed unused variable in TRY300
's example (#10190)
<!-- Thank you for contributing to Ruff! To help us out with reviewing, please consider the following: - Does this pull request include a summary of the change? (See below.) - Does this pull request include a descriptive title? - Does this pull request include references to any relevant issues? --> ## Summary Removes the unnecessary `exc` variable in `TRY300`'s docs example. ## Test Plan ``` python scripts/generate_mkdocs.py; mkdocs serve -f mkdocs.public.yml ```
This commit is contained in:
parent
c59d82a22e
commit
0cd3b07efa
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ use crate::checkers::ast::Checker;
|
||||||
/// rec = 1 / n
|
/// rec = 1 / n
|
||||||
/// print(f"reciprocal of {n} is {rec}")
|
/// print(f"reciprocal of {n} is {rec}")
|
||||||
/// return rec
|
/// return rec
|
||||||
/// except ZeroDivisionError as exc:
|
/// except ZeroDivisionError:
|
||||||
/// logging.exception("Exception occurred")
|
/// logging.exception("Exception occurred")
|
||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
|
@ -37,7 +37,7 @@ use crate::checkers::ast::Checker;
|
||||||
/// def reciprocal(n):
|
/// def reciprocal(n):
|
||||||
/// try:
|
/// try:
|
||||||
/// rec = 1 / n
|
/// rec = 1 / n
|
||||||
/// except ZeroDivisionError as exc:
|
/// except ZeroDivisionError:
|
||||||
/// logging.exception("Exception occurred")
|
/// logging.exception("Exception occurred")
|
||||||
/// else:
|
/// else:
|
||||||
/// print(f"reciprocal of {n} is {rec}")
|
/// print(f"reciprocal of {n} is {rec}")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue