Migrate to official pycqa/flake8 hooks repo

Committed via https://github.com/asottile/all-repos
This commit is contained in:
Anthony Sottile 2019-01-30 00:39:01 -08:00
parent b268b37482
commit 29460606b2
3 changed files with 13 additions and 10 deletions

View file

@ -29,9 +29,9 @@ def no_warnings(recwarn):
message = str(warning.message)
# ImportWarning: Not importing directory '...' missing __init__(.py)
if not (
isinstance(warning.message, ImportWarning)
and message.startswith('Not importing directory ')
and ' missing __init__' in message
isinstance(warning.message, ImportWarning) and
message.startswith('Not importing directory ') and
' missing __init__' in message
):
warnings.append('{}:{} {}'.format(
warning.filename,