Run flake8 on more files (#85333)

Co-authored-by: epenet <6771947+epenet@users.noreply.github.com>
Co-authored-by: Dave T <17680170+davet2001@users.noreply.github.com>
This commit is contained in:
Max R 2023-01-16 14:53:14 -05:00 committed by GitHub
parent 3aad153913
commit 156c815499
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 15 deletions

View file

@ -29,13 +29,13 @@ class HassLoggerFormatChecker(BaseChecker): # type: ignore[misc]
options = ()
def visit_call(self, node: nodes.Call) -> None:
"""Called when a Call node is visited."""
"""Check for improper log messages."""
if not isinstance(node.func, nodes.Attribute) or not isinstance(
node.func.expr, nodes.Name
):
return
if not node.func.expr.name in LOGGER_NAMES:
if node.func.expr.name not in LOGGER_NAMES:
return
if not node.args: