Open glyph opened 5 years ago
We'd happily accept a PR along those lines. Lacking that, if you can write a (failing) unit test, I can likely update the AST traversal accordingly.
As this is the only twisted
related issue I would like to add a false-positive:
The
G010 [*] Logging statement uses `warn` instead of `warning`
If the logger is twisted.logger.Logger this is not the case, as there is only warn
:
https://docs.twisted.org/en/latest/api/twisted.logger.Logger.html#warn
Twisted's logger is quite similar in the syntax it supports (and given that it always uses format strings, and all kwargs go to fill it out, this might be even easier)?
We'd really love to have a linter that could address both of these. Would you consider adding support for https://twistedmatrix.com/documents/18.9.0/api/twisted.logger.html ? We've been discussing ways to catch and remove
f
-strings,.format
calls, etc, and this is super close.