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:
trag1c 2024-03-02 00:50:52 +01:00 committed by GitHub
parent c59d82a22e
commit 0cd3b07efa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}")