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

False positive on G201 when getting the exc_info from a dict #24

Open
lindycoder opened this issue May 22, 2020 · 0 comments
Open

False positive on G201 when getting the exc_info from a dict #24

lindycoder opened this issue May 22, 2020 · 0 comments

Comments

@lindycoder
Copy link

Hello :)

Thank you for this tool, i noticed that if I try to specify an exc_info with a value coming from a dict defaulting to True, it would get flag as G201 Logging: .exception(...) should be used instead of .error(..., exc_info=True)

logger.error('My Message', exc_info=mydict.get('exc_info', True))

I'm not convinced rewriting my code with an if to use .exception instead of .error is better.

If you think this is not a False positive, feel free to close this :)

Thank you!

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

No branches or pull requests

1 participant