Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply ruff/tryceratops rule TRY401 #1053

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

DimitriPapadopoulos
Copy link
Contributor

TRY401 Redundant exception object included in `logging.exception` call

This is not a style issue. Rather, logging.exception() is now called the way it was designed to be called, resulting in an error message that is not redundant. From the logging.Logger.debug documentation:

If exc_info does not evaluate as false, it causes exception information to be added to the logging message. If an exception tuple (in the format returned by sys.exc_info()) or an exception instance is provided, it is used; otherwise, sys.exc_info() is called to get the exception information.

TRY401 Redundant exception object included in `logging.exception` call
@RonnyPfannschmidt RonnyPfannschmidt merged commit 4ec3208 into pypa:main Jul 20, 2024
18 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the TRY401 branch July 20, 2024 21:24
@DimitriPapadopoulos DimitriPapadopoulos restored the TRY401 branch July 20, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants