Skip to content

Commit

Permalink
Removed unused variable in TRY300's example (#10190)
Browse files Browse the repository at this point in the history
<!--
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
```
  • Loading branch information
trag1c authored Mar 1, 2024
1 parent c59d82a commit 0cd3b07
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
/// ```
///
Expand All @@ -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}")
Expand Down

0 comments on commit 0cd3b07

Please sign in to comment.