We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
A contrived minimal example that triggers for me:
class Foo: def info(arg) -> None: ... foo: Foo = Foo() world = "world" foo.info("hello {world}".format(world=world)) foo.info(f"hello {world}")
Gives a G001 and G004 even though foo is quite clearly not a logger, just an object with an info method.
foo
info
If I update the calls to use the extra keyword arg as flake8-logging-format requests, clearly this results in a runtime error calling Foo.info.
extra
flake8-logging-format
Foo.info
I ran into this issue in a non-trivial way with code which was making calls to a java logger through pyspark, which also doesn't support extra.
Could G001 be ignored whenever the object is clearly typehinted not to be a logging.Logger?
logging.Logger
The text was updated successfully, but these errors were encountered:
No branches or pull requests
A contrived minimal example that triggers for me:
Gives a G001 and G004 even though
foo
is quite clearly not a logger, just an object with aninfo
method.If I update the calls to use the
extra
keyword arg asflake8-logging-format
requests, clearly this results in a runtime error callingFoo.info
.I ran into this issue in a non-trivial way with code which was making calls to a java logger through pyspark, which also doesn't support
extra
.Could G001 be ignored whenever the object is clearly typehinted not to be a
logging.Logger
?The text was updated successfully, but these errors were encountered: