Open lindycoder opened 4 years ago
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)
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
.exception
.error
If you think this is not a False positive, feel free to close this :)
Thank you!
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)
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!