flake8 plugin which checks that typing imports are properly guarded

Overview

Build Status Azure DevOps coverage pre-commit.ci status

flake8-typing-imports

flake8 plugin which checks that typing imports are properly guarded

installation

pip install flake8-typing-imports

flake8 codes

Code Description
TYP001 guard import by TYPE_CHECKING
TYP002 @overload is broken in <3.5.2
TYP003 Union[Match, ...] or Union[Pattern, ...] must be quoted in <3.5.2
TYP004 NamedTuple does not support methods in 3.6.0
TYP005 NamedTuple does not support defaults in 3.6.0
TYP006 guard typing attribute by quoting

rationale

unfortunately, the typing module has been pretty unstable -- it has seen api changes in 3.5.0, 3.5.2, 3.5.3, 3.5.4, 3.6.0, 3.6.1, 3.6.2, 3.7.0, and 3.7.2!

depending on your supported version of python, you may need to guard your imports by if TYPE_CHECKING: (3.5.2+) or if False: if the things you are importing aren't available in all the pythons you support.

as it's pretty difficult to keep track of what version things changed and you can't always test against particular patch versions of python, this plugin helps you statically check this automatically!

# default / --min-python-version 3.5.0
from typing import Type  # TYP001
# default / --min-python-version 3.5.0
if False:
    from typing import Type  # OK!
# default / --min-python-version 3.5.0
from typing import overload  # TYP002
# default / --min-python-version 3.5.0
import sys
from typing import overload  # OK!
if sys.version_info < (3, 5, 2):
    def overload(f):
        return f
# default / --min-python-version 3.5.0
def foo(bar: Union[Match, str]) -> None: pass  # TYP003
def foo(bar: "Union[Match, str]") -> None: pass  # OK!

def foo(bar: Union[Pattern, str]) -> None: pass  # TYP003
def foo(bar: "Union[Pattern, str]") -> None: pass  # OK!
# --min-python-version 3.6.0
class NT(NamedTuple):
    x: int = 5  # TYP005

    def f(self) -> int:  # TYP004
        return self.x + 4
# --min-python-version 3.7.0
from typing import TYPE_CHECKING
if TYPE_CHECKING:
    from typing import OrderedDict  # OK!

configuration

this plugin has a single configuration point (beyond those provided by flake8) which is the --min-python-version option.

by default, this option is 3.5.0. this includes all versions of python which have the typing module present.

you can also set this option in the flake8 configuration if you don't want to use the commandline:

[flake8]
min_python_version = 3.6.2

if a >= is set for python_requires in setup.cfg, that value will be used:

# setup.cfg setuptools metadata

[options]
python_requires = >=3.6

as a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/pycqa/flake8
    rev: 3.7.7
    hooks:
    -   id: flake8
        additional_dependencies: [flake8-typing-imports==1.11.0]
Comments
  • python3.5.[01]: Union[Pattern, str] raises an error

    python3.5.[01]: Union[Pattern, str] raises an error

    Need to make sure this gets quoted instead of left unquoted:

    >>> Union[AnyStr, str]
    typing.Union[~AnyStr, str]
    >>> Union[str, Pattern]
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/local/lib/python3.5/typing.py", line 534, in __getitem__
        dict(self.__dict__), parameters, _root=True)
      File "/usr/local/lib/python3.5/typing.py", line 491, in __new__
        for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
      File "/usr/local/lib/python3.5/typing.py", line 491, in <genexpr>
        for t2 in all_params - {t1} if not isinstance(t2, TypeVar)):
    TypeError: issubclass() arg 1 must be a class
    
    enhancement help wanted good first issue 
    opened by asottile 6
  • Python version patch level is ignore

    Python version patch level is ignore

    Given foo.py

    from typing import OrderedDict
    

    Execute: flake8 --select TYP --min-python-version 3.7.2 foo.py

    foo.py:1:1: TYP001 guard import by `if TYPE_CHECKING:`: OrderedDict (not in 3.7.0, 3.7.1)
    

    This is not expected since I specified the minimum version of 3.7.2. I di some debugging in your code and the version is correctly read from the configuration but during the check the patch level is somehow erased from the version object

    opened by kasium 4
  • flake8-annotations Compatibility

    flake8-annotations Compatibility

    Hi, I ran into the below error when installing both flake8-annotations and flake8-typing-imports

    optparse.OptionConflictError: option --min-python-version: conflicting option string(s): --min-python-version

    Is there a way to use both extensions?


    Simple example using poetry for environment management, but also occurs with regular Python

    >poetry add flake8-annotations flake8-typing-imports
    >poetry run flake8 --version
    (errors)
    >poetry run flake8 tmp.py
    (errors)
    
    >poetry remove flake8-annotations
    >poetry run flake8 --version
    (passes)
    >poetry run flake8 tmp.py
    (passes)
    

    Full traceback:

    (base) C:\Users\king.kyle\TestFlake8>poetry run flake8 --version
    Traceback (most recent call last):
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\runpy.py", line 85, in _run_code        
        exec(code, run_globals)
      File "C:\Users\king.kyle\AppData\Local\pypoetry\Cache\virtualenvs\testflake8-8tFupX_2-py3.6\Scripts\flake8.exe\__main__.py", line 9, in <module>
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\cli.py", line 18, in main
        app.run(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 393, in run
        self._run(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 380, in _run
        self.initialize(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 364, in initialize
        self.register_plugin_options()
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 205, in register_plugin_options
        self.check_plugins.register_options(self.option_manager)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 489, in register_options
        list(self.manager.map(register_and_enable))
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 297, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 485, in register_and_enable
        call_register_options(plugin)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 397, in generated_function
        return method(optmanager, *args, **kwargs)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 216, in register_options
        add_options(optmanager)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8_typing_imports.py", line 512, in add_options
        'Minimum version of python your code supports, '
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\options\manager.py", line 231, in add_option
        self.parser.add_option(option.to_optparse())
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\optparse.py", line 1008, in add_option  
        self._check_conflict(option)
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\optparse.py", line 983, in _check_conflict
        option)
    optparse.OptionConflictError: option --min-python-version: conflicting option string(s): --min-python-version       
    
    (base) C:\Users\king.kyle\TestFlake8>
    

    Additional Information

    Full Command Prompt Output
    (base) C:\Users\king.kyle\TestFlake8>poetry update
    Updating dependencies
    Resolving dependencies...
    
    Writing lock file
    
    
    Package operations: 1 install, 0 updates, 0 removals
    
      - Installing flake8-annotations (1.1.3)
      - Installing flake8-typing-imports (1.5.0)
    
    (base) C:\Users\king.kyle\TestFlake8>poetry run flake8 --version
    Traceback (most recent call last):
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\runpy.py", line 85, in _run_code        
        exec(code, run_globals)
      File "C:\Users\king.kyle\AppData\Local\pypoetry\Cache\virtualenvs\testflake8-8tFupX_2-py3.6\Scripts\flake8.exe\__main__.py", line 9, in <module>
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\cli.py", line 18, in main
        app.run(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 393, in run
        self._run(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 380, in _run
        self.initialize(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 364, in initialize
        self.register_plugin_options()
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 205, in register_plugin_options
        self.check_plugins.register_options(self.option_manager)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 489, in register_options
        list(self.manager.map(register_and_enable))
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 297, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 485, in register_and_enable
        call_register_options(plugin)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 397, in generated_function
        return method(optmanager, *args, **kwargs)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 216, in register_options
        add_options(optmanager)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8_typing_imports.py", line 512, in add_options
        'Minimum version of python your code supports, '
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\options\manager.py", line 231, in add_option
        self.parser.add_option(option.to_optparse())
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\optparse.py", line 1008, in add_option  
        self._check_conflict(option)
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\optparse.py", line 983, in _check_conflict
        option)
    optparse.OptionConflictError: option --min-python-version: conflicting option string(s): --min-python-version       
    
    (base) C:\Users\king.kyle\TestFlake8>poetry run flake8 tmp.py
    Traceback (most recent call last):
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\runpy.py", line 85, in _run_code        
        exec(code, run_globals)
      File "C:\Users\king.kyle\AppData\Local\pypoetry\Cache\virtualenvs\testflake8-8tFupX_2-py3.6\Scripts\flake8.exe\__main__.py", line 9, in <module>
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\cli.py", line 18, in main
        app.run(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 393, in run
        self._run(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 380, in _run
        self.initialize(argv)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 364, in initialize
        self.register_plugin_options()
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\main\application.py", line 205, in register_plugin_options
        self.check_plugins.register_options(self.option_manager)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 489, in register_options
        list(self.manager.map(register_and_enable))
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 297, in map
        yield func(self.plugins[name], *args, **kwargs)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 485, in register_and_enable
        call_register_options(plugin)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 397, in generated_function
        return method(optmanager, *args, **kwargs)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\plugins\manager.py", line 216, in register_options
        add_options(optmanager)
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8_typing_imports.py", line 512, in add_options
        'Minimum version of python your code supports, '
      File "c:\users\king.kyle\appdata\local\pypoetry\cache\virtualenvs\testflake8-8tfupx_2-py3.6\lib\site-packages\flake8\options\manager.py", line 231, in add_option
        self.parser.add_option(option.to_optparse())
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\optparse.py", line 1008, in add_option  
        self._check_conflict(option)
      File "C:\Users\king.kyle\AppData\Local\Continuum\anaconda3\envs\py368\lib\optparse.py", line 983, in _check_conflict
        option)
    optparse.OptionConflictError: option --min-python-version: conflicting option string(s): --min-python-version       
    
    (base) C:\Users\king.kyle\TestFlake8>poetry update
    Updating dependencies
    Resolving dependencies...
    
    Writing lock file
    
    
    Package operations: 0 installs, 0 updates, 1 removal
    
      - Removing flake8-annotations (1.1.3)
    
    (base) C:\Users\king.kyle\TestFlake8>poetry run flake8 tmp.py
    tmp.py:10:80: E501 line too long (87 > 79 characters)
    
    (base) C:\Users\king.kyle\TestFlake8>poetry run pip freeze
    entrypoints==0.3
    flake8==3.7.9
    flake8-typing-imports==1.5.0
    importlib-metadata==1.5.0
    mccabe==0.6.1
    pycodestyle==2.5.0
    pyflakes==2.1.1
    typed-ast==1.4.1
    zipp==2.1.0
    
    flake8.log
    2020-01-30 09:09:30,030 manager.py:238    Registered option "Option(-v, --verbose, action=count, default=0, dest=verbose, type=None, callback=None, help=Print more information about what is happening in flake8. This option is repeatable and will increase verbosity each time it is repeated., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,031 manager.py:238    Registered option "Option(-q, --quiet, action=count, default=0, dest=quiet, type=None, callback=None, help=Report only file names, or nothing. This option is repeatable., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,031 manager.py:238    Registered option "Option(None, --count, action=store_true, default=None, dest=count, type=None, callback=None, help=Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,036 manager.py:238    Registered option "Option(None, --diff, action=store_true, default=None, dest=diff, type=None, callback=None, help=Report changes only within line number ranges in the unified diff provided on standard in by the user., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,037 manager.py:238    Registered option "Option(None, --exclude, action=None, default=.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg, dest=exclude, type=None, callback=None, help=Comma-separated list of files or directories to exclude. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=patterns)".
    2020-01-30 09:09:30,037 manager.py:238    Registered option "Option(None, --filename, action=None, default=*.py, dest=filename, type=None, callback=None, help=Only check for filenames matching the patterns in this comma-separated list. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=patterns)".
    2020-01-30 09:09:30,038 manager.py:238    Registered option "Option(None, --stdin-display-name, action=None, default=stdin, dest=stdin_display_name, type=None, callback=None, help=The name used when reporting errors from code passed via stdin. This is useful for editors piping the file contents to flake8. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,039 manager.py:238    Registered option "Option(None, --format, action=None, default=default, dest=format, type=None, callback=None, help=Format errors according to the chosen formatter., callback=None, callback_args=None, callback_kwargs=None, metavar=format)".
    2020-01-30 09:09:30,058 manager.py:238    Registered option "Option(None, --hang-closing, action=store_true, default=None, dest=hang_closing, type=None, callback=None, help=Hang closing bracket instead of matching indentation of opening bracket's line., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,059 manager.py:238    Registered option "Option(None, --ignore, action=None, default=E121,E123,E126,E226,E24,E704,W503,W504, dest=ignore, type=None, callback=None, help=Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=errors)".
    2020-01-30 09:09:30,060 manager.py:238    Registered option "Option(None, --extend-ignore, action=None, default=, dest=extend_ignore, type=None, callback=None, help=Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``., callback=None, callback_args=None, callback_kwargs=None, metavar=errors)".
    2020-01-30 09:09:30,060 manager.py:238    Registered option "Option(None, --per-file-ignores, action=None, default=, dest=per_file_ignores, type=None, callback=None, help=A pairing of filenames and violation codes that defines which violations to ignore in a particular file. The filenames can be specified in a manner similar to the ``--exclude`` option and the violations work similarly to the ``--ignore`` and ``--select`` options., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,061 manager.py:238    Registered option "Option(None, --max-line-length, action=None, default=79, dest=max_line_length, type=int, callback=None, help=Maximum allowed line length for the entirety of this run. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=n)".
    2020-01-30 09:09:30,062 manager.py:238    Registered option "Option(None, --max-doc-length, action=None, default=None, dest=max_doc_length, type=int, callback=None, help=Maximum allowed doc line length for the entirety of this run. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=n)".
    2020-01-30 09:09:30,062 manager.py:238    Registered option "Option(None, --select, action=None, default=E,F,W,C90, dest=select, type=None, callback=None, help=Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=errors)".
    2020-01-30 09:09:30,063 manager.py:238    Registered option "Option(None, --disable-noqa, action=store_true, default=False, dest=disable_noqa, type=None, callback=None, help=Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,063 manager.py:238    Registered option "Option(None, --show-source, action=store_true, default=None, dest=show_source, type=None, callback=None, help=Show the source generate each error or warning., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,063 manager.py:238    Registered option "Option(None, --statistics, action=store_true, default=None, dest=statistics, type=None, callback=None, help=Count errors and warnings., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,064 manager.py:238    Registered option "Option(None, --enable-extensions, action=None, default=, dest=enable_extensions, type=string, callback=None, help=Enable plugins and extensions that are otherwise disabled by default, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,064 manager.py:238    Registered option "Option(None, --exit-zero, action=store_true, default=None, dest=exit_zero, type=None, callback=None, help=Exit with status code "0" even if there are errors., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,065 manager.py:238    Registered option "Option(None, --install-hook, action=callback, default=None, dest=install_hook, type=choice, callback=<function install at 0x00000221C5750E18>, help=Install a hook that is run prior to a commit for the supported version control system., callback=<function install at 0x00000221C5750E18>, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,065 manager.py:238    Registered option "Option(-j, --jobs, action=None, default=auto, dest=jobs, type=string, callback=None, help=Number of subprocesses to use to run checks in parallel. This is ignored on Windows. The default, "auto", will auto-detect the number of processors available to use. (Default: %default), callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,065 manager.py:238    Registered option "Option(None, --output-file, action=None, default=None, dest=output_file, type=string, callback=None, help=Redirect report to a file., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,066 manager.py:238    Registered option "Option(None, --tee, action=store_true, default=False, dest=tee, type=None, callback=None, help=Write to stdout and output-file., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,066 manager.py:238    Registered option "Option(None, --append-config, action=append, default=None, dest=append_config, type=None, callback=None, help=Provide extra config files to parse in addition to the files found by Flake8 by default. These files are the last ones read and so they take the highest precedence when multiple files provide the same option., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,066 manager.py:238    Registered option "Option(None, --config, action=None, default=None, dest=config, type=None, callback=None, help=Path to the config file that will be the authoritative config source. This will cause Flake8 to ignore all other configuration files., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,067 manager.py:238    Registered option "Option(None, --isolated, action=store_true, default=False, dest=isolated, type=None, callback=None, help=Ignore all configuration files., callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,067 manager.py:238    Registered option "Option(None, --benchmark, action=store_true, default=False, dest=benchmark, type=None, callback=None, help=Print benchmark information about this run of Flake8, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,067 manager.py:238    Registered option "Option(None, --bug-report, action=callback, default=None, dest=bug_report, type=None, callback=<function print_information at 0x00000221C56BDA60>, help=Print information necessary when preparing a bug report, callback=<function print_information at 0x00000221C56BDA60>, callback_args=None, callback_kwargs={'option_manager': <flake8.options.manager.OptionManager object at 0x00000221C52C0208>}, metavar=None)".
    2020-01-30 09:09:30,070 manager.py:254    Loading entry-points for "flake8.extension".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="F", entry_point="EntryPoint('F', 'flake8.plugins.pyflakes', 'FlakesChecker', Distribution('flake8', '3.7.9'))") for plugin "F".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="EntryPoint('pycodestyle.ambiguous_identifier', 'pycodestyle', 'ambiguous_identifier', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.ambiguous_identifier".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.bare_except", entry_point="EntryPoint('pycodestyle.bare_except', 'pycodestyle', 'bare_except', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.bare_except".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.blank_lines", entry_point="EntryPoint('pycodestyle.blank_lines', 'pycodestyle', 'blank_lines', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.blank_lines".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="EntryPoint('pycodestyle.break_after_binary_operator', 'pycodestyle', 'break_after_binary_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.break_after_binary_operator".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="EntryPoint('pycodestyle.break_before_binary_operator', 'pycodestyle', 'break_before_binary_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.break_before_binary_operator".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="EntryPoint('pycodestyle.comparison_negative', 'pycodestyle', 'comparison_negative', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.comparison_negative".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="EntryPoint('pycodestyle.comparison_to_singleton', 'pycodestyle', 'comparison_to_singleton', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.comparison_to_singleton".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.comparison_type", entry_point="EntryPoint('pycodestyle.comparison_type', 'pycodestyle', 'comparison_type', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.comparison_type".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.compound_statements", entry_point="EntryPoint('pycodestyle.compound_statements', 'pycodestyle', 'compound_statements', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.compound_statements".
    2020-01-30 09:09:30,083 manager.py:275    Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="EntryPoint('pycodestyle.continued_indentation', 'pycodestyle', 'continued_indentation', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.continued_indentation".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="EntryPoint('pycodestyle.explicit_line_join', 'pycodestyle', 'explicit_line_join', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.explicit_line_join".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="EntryPoint('pycodestyle.extraneous_whitespace', 'pycodestyle', 'extraneous_whitespace', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.extraneous_whitespace".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="EntryPoint('pycodestyle.imports_on_separate_lines', 'pycodestyle', 'imports_on_separate_lines', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.imports_on_separate_lines".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.indentation", entry_point="EntryPoint('pycodestyle.indentation', 'pycodestyle', 'indentation', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.indentation".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="EntryPoint('pycodestyle.maximum_doc_length', 'pycodestyle', 'maximum_doc_length', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.maximum_doc_length".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="EntryPoint('pycodestyle.maximum_line_length', 'pycodestyle', 'maximum_line_length', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.maximum_line_length".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="EntryPoint('pycodestyle.missing_whitespace', 'pycodestyle', 'missing_whitespace', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.missing_whitespace".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="EntryPoint('pycodestyle.missing_whitespace_after_import_keyword', 'pycodestyle', 'missing_whitespace_after_import_keyword', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.missing_whitespace_after_import_keyword".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="EntryPoint('pycodestyle.missing_whitespace_around_operator', 'pycodestyle', 'missing_whitespace_around_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.missing_whitespace_around_operator".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="EntryPoint('pycodestyle.module_imports_on_top_of_file', 'pycodestyle', 'module_imports_on_top_of_file', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.module_imports_on_top_of_file".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="EntryPoint('pycodestyle.python_3000_async_await_keywords', 'pycodestyle', 'python_3000_async_await_keywords', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_async_await_keywords".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="EntryPoint('pycodestyle.python_3000_backticks', 'pycodestyle', 'python_3000_backticks', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_backticks".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="EntryPoint('pycodestyle.python_3000_has_key', 'pycodestyle', 'python_3000_has_key', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_has_key".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="EntryPoint('pycodestyle.python_3000_invalid_escape_sequence', 'pycodestyle', 'python_3000_invalid_escape_sequence', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_invalid_escape_sequence".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="EntryPoint('pycodestyle.python_3000_not_equal', 'pycodestyle', 'python_3000_not_equal', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_not_equal".
    2020-01-30 09:09:30,084 manager.py:275    Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="EntryPoint('pycodestyle.python_3000_raise_comma', 'pycodestyle', 'python_3000_raise_comma', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_raise_comma".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="EntryPoint('pycodestyle.tabs_obsolete', 'pycodestyle', 'tabs_obsolete', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.tabs_obsolete".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="EntryPoint('pycodestyle.tabs_or_spaces', 'pycodestyle', 'tabs_or_spaces', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.tabs_or_spaces".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="EntryPoint('pycodestyle.trailing_blank_lines', 'pycodestyle', 'trailing_blank_lines', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.trailing_blank_lines".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="EntryPoint('pycodestyle.trailing_whitespace', 'pycodestyle', 'trailing_whitespace', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.trailing_whitespace".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="EntryPoint('pycodestyle.whitespace_around_comma', 'pycodestyle', 'whitespace_around_comma', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_comma".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="EntryPoint('pycodestyle.whitespace_around_keywords', 'pycodestyle', 'whitespace_around_keywords', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_keywords".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="EntryPoint('pycodestyle.whitespace_around_named_parameter_equals', 'pycodestyle', 'whitespace_around_named_parameter_equals', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_named_parameter_equals".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="EntryPoint('pycodestyle.whitespace_around_operator', 'pycodestyle', 'whitespace_around_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_operator".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="EntryPoint('pycodestyle.whitespace_before_comment', 'pycodestyle', 'whitespace_before_comment', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_before_comment".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="EntryPoint('pycodestyle.whitespace_before_parameters', 'pycodestyle', 'whitespace_before_parameters', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_before_parameters".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="TYP", entry_point="EntryPoint('TYP', 'flake8_annotations.checker', 'TypeHintChecker', Distribution('flake8_annotations', '1.1.3'))") for plugin "TYP".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="TYP", entry_point="EntryPoint('TYP', 'flake8_typing_imports', 'Plugin', Distribution('flake8_typing_imports', '1.5.0'))") for plugin "TYP".
    2020-01-30 09:09:30,085 manager.py:275    Loaded Plugin(name="C90", entry_point="EntryPoint('C90', 'mccabe', 'McCabeChecker', Distribution('mccabe', '0.6.1'))") for plugin "C90".
    2020-01-30 09:09:30,085 manager.py:254    Loading entry-points for "flake8.report".
    2020-01-30 09:09:30,096 manager.py:275    Loaded Plugin(name="default", entry_point="EntryPoint('default', 'flake8.formatting.default', 'Default', Distribution('flake8', '3.7.9'))") for plugin "default".
    2020-01-30 09:09:30,096 manager.py:275    Loaded Plugin(name="pylint", entry_point="EntryPoint('pylint', 'flake8.formatting.default', 'Pylint', Distribution('flake8', '3.7.9'))") for plugin "pylint".
    2020-01-30 09:09:30,096 manager.py:275    Loaded Plugin(name="quiet-filename", entry_point="EntryPoint('quiet-filename', 'flake8.formatting.default', 'FilenameOnly', Distribution('flake8', '3.7.9'))") for plugin "quiet-filename".
    2020-01-30 09:09:30,096 manager.py:275    Loaded Plugin(name="quiet-nothing", entry_point="EntryPoint('quiet-nothing', 'flake8.formatting.default', 'Nothing', Distribution('flake8', '3.7.9'))") for plugin "quiet-nothing".
    2020-01-30 09:09:30,096 manager.py:156    Loading plugin "F" from entry-point.
    2020-01-30 09:09:30,124 manager.py:156    Loading plugin "pycodestyle.ambiguous_identifier" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.bare_except" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.blank_lines" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.break_after_binary_operator" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.break_before_binary_operator" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.comparison_negative" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.comparison_to_singleton" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.comparison_type" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.compound_statements" from entry-point.
    2020-01-30 09:09:30,131 manager.py:156    Loading plugin "pycodestyle.continued_indentation" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.explicit_line_join" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.extraneous_whitespace" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.imports_on_separate_lines" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.indentation" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.maximum_doc_length" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.maximum_line_length" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.missing_whitespace" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.missing_whitespace_after_import_keyword" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.missing_whitespace_around_operator" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.module_imports_on_top_of_file" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.python_3000_async_await_keywords" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.python_3000_backticks" from entry-point.
    2020-01-30 09:09:30,132 manager.py:156    Loading plugin "pycodestyle.python_3000_has_key" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.python_3000_invalid_escape_sequence" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.python_3000_not_equal" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.python_3000_raise_comma" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.tabs_obsolete" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.tabs_or_spaces" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.trailing_blank_lines" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.trailing_whitespace" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.whitespace_around_comma" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.whitespace_around_keywords" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.whitespace_around_named_parameter_equals" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.whitespace_around_operator" from entry-point.
    2020-01-30 09:09:30,133 manager.py:156    Loading plugin "pycodestyle.whitespace_before_comment" from entry-point.
    2020-01-30 09:09:30,134 manager.py:156    Loading plugin "pycodestyle.whitespace_before_parameters" from entry-point.
    2020-01-30 09:09:30,134 manager.py:156    Loading plugin "TYP" from entry-point.
    2020-01-30 09:09:30,168 manager.py:156    Loading plugin "C90" from entry-point.
    2020-01-30 09:09:30,169 manager.py:156    Loading plugin "default" from entry-point.
    2020-01-30 09:09:30,171 manager.py:156    Loading plugin "pylint" from entry-point.
    2020-01-30 09:09:30,171 manager.py:156    Loading plugin "quiet-filename" from entry-point.
    2020-01-30 09:09:30,171 manager.py:156    Loading plugin "quiet-nothing" from entry-point.
    2020-01-30 09:09:30,173 manager.py:216    Registering options from plugin "F" on OptionManager <flake8.options.manager.OptionManager object at 0x00000221C52C0208>
    2020-01-30 09:09:30,174 manager.py:238    Registered option "Option(None, --builtins, action=None, default=None, dest=builtins, type=None, callback=None, help=define more built-ins, comma separated, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,174 manager.py:238    Registered option "Option(None, --doctests, action=store_true, default=False, dest=doctests, type=None, callback=None, help=check syntax of the doctests, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,175 manager.py:238    Registered option "Option(None, --include-in-doctest, action=None, default=, dest=include_in_doctest, type=string, callback=None, help=Run doctests only on these files, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,176 manager.py:238    Registered option "Option(None, --exclude-from-doctest, action=None, default=, dest=exclude_from_doctest, type=string, callback=None, help=Skip these files when running doctests, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    2020-01-30 09:09:30,176 manager.py:247    Removing ['F'] from the default ignore list
    2020-01-30 09:09:30,176 manager.py:255    Attempted to remove F from default ignore but it was not a member of the list.
    2020-01-30 09:09:30,176 manager.py:275    Extending default select list with ['F']
    2020-01-30 09:09:30,177 manager.py:216    Registering options from plugin "TYP" on OptionManager <flake8.options.manager.OptionManager object at 0x00000221C52C0208>
    2020-01-30 09:09:30,178 manager.py:238    Registered option "Option(None, --min-python-version, action=None, default=3.5.0, dest=min_python_version, type=str, callback=None, help=Minimum version of python your code supports, (default: %(default)s), callback=None, callback_args=None, callback_kwargs=None, metavar=VERSION)".
    2020-01-30 09:09:30,178 manager.py:247    Removing ['TYP'] from the default ignore list
    2020-01-30 09:09:30,178 manager.py:255    Attempted to remove TYP from default ignore but it was not a member of the list.
    2020-01-30 09:09:30,178 manager.py:275    Extending default select list with ['TYP']
    2020-01-30 09:09:30,179 manager.py:216    Registering options from plugin "TYP" on OptionManager <flake8.options.manager.OptionManager object at 0x00000221C52C0208>
    flake8                    MainProcess    117 DEBUG    Added a C:/Users/king.kyle/Downloads/flake8.log logging handler to logger root at flake8
    flake8.plugins.manager    MainProcess    119 INFO     Loading entry-points for "flake8.extension".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="F", entry_point="EntryPoint('F', 'flake8.plugins.pyflakes', 'FlakesChecker', Distribution('flake8', '3.7.9'))") for plugin "F".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="EntryPoint('pycodestyle.ambiguous_identifier', 'pycodestyle', 'ambiguous_identifier', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.ambiguous_identifier".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.bare_except", entry_point="EntryPoint('pycodestyle.bare_except', 'pycodestyle', 'bare_except', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.bare_except".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.blank_lines", entry_point="EntryPoint('pycodestyle.blank_lines', 'pycodestyle', 'blank_lines', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.blank_lines".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="EntryPoint('pycodestyle.break_after_binary_operator', 'pycodestyle', 'break_after_binary_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.break_after_binary_operator".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="EntryPoint('pycodestyle.break_before_binary_operator', 'pycodestyle', 'break_before_binary_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.break_before_binary_operator".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="EntryPoint('pycodestyle.comparison_negative', 'pycodestyle', 'comparison_negative', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.comparison_negative".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="EntryPoint('pycodestyle.comparison_to_singleton', 'pycodestyle', 'comparison_to_singleton', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.comparison_to_singleton".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.comparison_type", entry_point="EntryPoint('pycodestyle.comparison_type', 'pycodestyle', 'comparison_type', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.comparison_type".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.compound_statements", entry_point="EntryPoint('pycodestyle.compound_statements', 'pycodestyle', 'compound_statements', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.compound_statements".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="EntryPoint('pycodestyle.continued_indentation', 'pycodestyle', 'continued_indentation', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.continued_indentation".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="EntryPoint('pycodestyle.explicit_line_join', 'pycodestyle', 'explicit_line_join', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.explicit_line_join".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="EntryPoint('pycodestyle.extraneous_whitespace', 'pycodestyle', 'extraneous_whitespace', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.extraneous_whitespace".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="EntryPoint('pycodestyle.imports_on_separate_lines', 'pycodestyle', 'imports_on_separate_lines', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.imports_on_separate_lines".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.indentation", entry_point="EntryPoint('pycodestyle.indentation', 'pycodestyle', 'indentation', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.indentation".
    flake8.plugins.manager    MainProcess    232 DEBUG    Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="EntryPoint('pycodestyle.maximum_doc_length', 'pycodestyle', 'maximum_doc_length', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.maximum_doc_length".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="EntryPoint('pycodestyle.maximum_line_length', 'pycodestyle', 'maximum_line_length', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.maximum_line_length".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="EntryPoint('pycodestyle.missing_whitespace', 'pycodestyle', 'missing_whitespace', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.missing_whitespace".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="EntryPoint('pycodestyle.missing_whitespace_after_import_keyword', 'pycodestyle', 'missing_whitespace_after_import_keyword', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.missing_whitespace_after_import_keyword".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="EntryPoint('pycodestyle.missing_whitespace_around_operator', 'pycodestyle', 'missing_whitespace_around_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.missing_whitespace_around_operator".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="EntryPoint('pycodestyle.module_imports_on_top_of_file', 'pycodestyle', 'module_imports_on_top_of_file', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.module_imports_on_top_of_file".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="EntryPoint('pycodestyle.python_3000_async_await_keywords', 'pycodestyle', 'python_3000_async_await_keywords', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_async_await_keywords".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="EntryPoint('pycodestyle.python_3000_backticks', 'pycodestyle', 'python_3000_backticks', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_backticks".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="EntryPoint('pycodestyle.python_3000_has_key', 'pycodestyle', 'python_3000_has_key', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_has_key".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="EntryPoint('pycodestyle.python_3000_invalid_escape_sequence', 'pycodestyle', 'python_3000_invalid_escape_sequence', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_invalid_escape_sequence".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="EntryPoint('pycodestyle.python_3000_not_equal', 'pycodestyle', 'python_3000_not_equal', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_not_equal".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="EntryPoint('pycodestyle.python_3000_raise_comma', 'pycodestyle', 'python_3000_raise_comma', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.python_3000_raise_comma".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="EntryPoint('pycodestyle.tabs_obsolete', 'pycodestyle', 'tabs_obsolete', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.tabs_obsolete".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="EntryPoint('pycodestyle.tabs_or_spaces', 'pycodestyle', 'tabs_or_spaces', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.tabs_or_spaces".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="EntryPoint('pycodestyle.trailing_blank_lines', 'pycodestyle', 'trailing_blank_lines', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.trailing_blank_lines".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="EntryPoint('pycodestyle.trailing_whitespace', 'pycodestyle', 'trailing_whitespace', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.trailing_whitespace".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="EntryPoint('pycodestyle.whitespace_around_comma', 'pycodestyle', 'whitespace_around_comma', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_comma".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="EntryPoint('pycodestyle.whitespace_around_keywords', 'pycodestyle', 'whitespace_around_keywords', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_keywords".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="EntryPoint('pycodestyle.whitespace_around_named_parameter_equals', 'pycodestyle', 'whitespace_around_named_parameter_equals', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_named_parameter_equals".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="EntryPoint('pycodestyle.whitespace_around_operator', 'pycodestyle', 'whitespace_around_operator', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_around_operator".
    flake8.plugins.manager    MainProcess    233 DEBUG    Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="EntryPoint('pycodestyle.whitespace_before_comment', 'pycodestyle', 'whitespace_before_comment', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_before_comment".
    flake8.plugins.manager    MainProcess    234 DEBUG    Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="EntryPoint('pycodestyle.whitespace_before_parameters', 'pycodestyle', 'whitespace_before_parameters', Distribution('flake8', '3.7.9'))") for plugin "pycodestyle.whitespace_before_parameters".
    flake8.plugins.manager    MainProcess    234 DEBUG    Loaded Plugin(name="TYP", entry_point="EntryPoint('TYP', 'flake8_annotations.checker', 'TypeHintChecker', Distribution('flake8_annotations', '1.1.3'))") for plugin "TYP".
    flake8.plugins.manager    MainProcess    234 DEBUG    Loaded Plugin(name="TYP", entry_point="EntryPoint('TYP', 'flake8_typing_imports', 'Plugin', Distribution('flake8_typing_imports', '1.5.0'))") for plugin "TYP".
    flake8.plugins.manager    MainProcess    234 DEBUG    Loaded Plugin(name="C90", entry_point="EntryPoint('C90', 'mccabe', 'McCabeChecker', Distribution('mccabe', '0.6.1'))") for plugin "C90".
    flake8.plugins.manager    MainProcess    234 INFO     Loading entry-points for "flake8.report".
    flake8.plugins.manager    MainProcess    243 DEBUG    Loaded Plugin(name="default", entry_point="EntryPoint('default', 'flake8.formatting.default', 'Default', Distribution('flake8', '3.7.9'))") for plugin "default".
    flake8.plugins.manager    MainProcess    243 DEBUG    Loaded Plugin(name="pylint", entry_point="EntryPoint('pylint', 'flake8.formatting.default', 'Pylint', Distribution('flake8', '3.7.9'))") for plugin "pylint".
    flake8.plugins.manager    MainProcess    243 DEBUG    Loaded Plugin(name="quiet-filename", entry_point="EntryPoint('quiet-filename', 'flake8.formatting.default', 'FilenameOnly', Distribution('flake8', '3.7.9'))") for plugin "quiet-filename".
    flake8.plugins.manager    MainProcess    243 DEBUG    Loaded Plugin(name="quiet-nothing", entry_point="EntryPoint('quiet-nothing', 'flake8.formatting.default', 'Nothing', Distribution('flake8', '3.7.9'))") for plugin "quiet-nothing".
    flake8.plugins.manager    MainProcess    243 INFO     Loading plugin "F" from entry-point.
    flake8.plugins.manager    MainProcess    268 INFO     Loading plugin "pycodestyle.ambiguous_identifier" from entry-point.
    flake8.plugins.manager    MainProcess    273 INFO     Loading plugin "pycodestyle.bare_except" from entry-point.
    flake8.plugins.manager    MainProcess    273 INFO     Loading plugin "pycodestyle.blank_lines" from entry-point.
    flake8.plugins.manager    MainProcess    273 INFO     Loading plugin "pycodestyle.break_after_binary_operator" from entry-point.
    flake8.plugins.manager    MainProcess    273 INFO     Loading plugin "pycodestyle.break_before_binary_operator" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.comparison_negative" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.comparison_to_singleton" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.comparison_type" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.compound_statements" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.continued_indentation" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.explicit_line_join" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.extraneous_whitespace" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.imports_on_separate_lines" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.indentation" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.maximum_doc_length" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.maximum_line_length" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.missing_whitespace" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.missing_whitespace_after_import_keyword" from entry-point.
    flake8.plugins.manager    MainProcess    274 INFO     Loading plugin "pycodestyle.missing_whitespace_around_operator" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.module_imports_on_top_of_file" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.python_3000_async_await_keywords" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.python_3000_backticks" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.python_3000_has_key" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.python_3000_invalid_escape_sequence" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.python_3000_not_equal" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.python_3000_raise_comma" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.tabs_obsolete" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.tabs_or_spaces" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.trailing_blank_lines" from entry-point.
    flake8.plugins.manager    MainProcess    275 INFO     Loading plugin "pycodestyle.trailing_whitespace" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "pycodestyle.whitespace_around_comma" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "pycodestyle.whitespace_around_keywords" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "pycodestyle.whitespace_around_named_parameter_equals" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "pycodestyle.whitespace_around_operator" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "pycodestyle.whitespace_before_comment" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "pycodestyle.whitespace_before_parameters" from entry-point.
    flake8.plugins.manager    MainProcess    276 INFO     Loading plugin "TYP" from entry-point.
    flake8.plugins.manager    MainProcess    310 INFO     Loading plugin "C90" from entry-point.
    flake8.plugins.manager    MainProcess    312 INFO     Loading plugin "default" from entry-point.
    flake8.plugins.manager    MainProcess    314 INFO     Loading plugin "pylint" from entry-point.
    flake8.plugins.manager    MainProcess    314 INFO     Loading plugin "quiet-filename" from entry-point.
    flake8.plugins.manager    MainProcess    314 INFO     Loading plugin "quiet-nothing" from entry-point.
    flake8.plugins.manager    MainProcess    315 DEBUG    Registering options from plugin "F" on OptionManager <flake8.options.manager.OptionManager object at 0x0000022D72A02D30>
    flake8.options.manager    MainProcess    316 DEBUG    Registered option "Option(None, --builtins, action=None, default=None, dest=builtins, type=None, callback=None, help=define more built-ins, comma separated, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    flake8.options.manager    MainProcess    335 DEBUG    Registered option "Option(None, --doctests, action=store_true, default=False, dest=doctests, type=None, callback=None, help=check syntax of the doctests, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    flake8.options.manager    MainProcess    336 DEBUG    Registered option "Option(None, --include-in-doctest, action=None, default=, dest=include_in_doctest, type=string, callback=None, help=Run doctests only on these files, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    flake8.options.manager    MainProcess    337 DEBUG    Registered option "Option(None, --exclude-from-doctest, action=None, default=, dest=exclude_from_doctest, type=string, callback=None, help=Skip these files when running doctests, callback=None, callback_args=None, callback_kwargs=None, metavar=None)".
    flake8.options.manager    MainProcess    337 DEBUG    Removing ['F'] from the default ignore list
    flake8.options.manager    MainProcess    337 DEBUG    Attempted to remove F from default ignore but it was not a member of the list.
    flake8.options.manager    MainProcess    337 DEBUG    Extending default select list with ['F']
    flake8.plugins.manager    MainProcess    339 DEBUG    Registering options from plugin "TYP" on OptionManager <flake8.options.manager.OptionManager object at 0x0000022D72A02D30>
    flake8.options.manager    MainProcess    339 DEBUG    Registered option "Option(None, --min-python-version, action=None, default=3.5.0, dest=min_python_version, type=str, callback=None, help=Minimum version of python your code supports, (default: %(default)s), callback=None, callback_args=None, callback_kwargs=None, metavar=VERSION)".
    flake8.options.manager    MainProcess    339 DEBUG    Removing ['TYP'] from the default ignore list
    flake8.options.manager    MainProcess    340 DEBUG    Attempted to remove TYP from default ignore but it was not a member of the list.
    flake8.options.manager    MainProcess    340 DEBUG    Extending default select list with ['TYP']
    flake8.plugins.manager    MainProcess    340 DEBUG    Registering options from plugin "TYP" on OptionManager <flake8.options.manager.OptionManager object at 0x0000022D72A02D30>
    
    opened by KyleKing 4
  • Release package as a typed one

    Release package as a typed one

    Hello,

    I really love this flake8 plugin, so thanks a lot for creating it. I working on a flake8 plugin which has own rules but also wraps other plugins, also this one. I know that this is not in scope of this project, but it would be great if you could add a py.typed file somehow, so that user importing the script as code can benefit from the already present types.

    I'm happy to contribute if you like.

    Thanks, Kai

    opened by kasium 2
  • Detect attributes from typing alias

    Detect attributes from typing alias

    #17 allowed typing.NoReturn instead of NoReturn, but we do import typing as t for a shorter name.

    I know this is similar to the typing.overload issue in https://github.com/PyCQA/pyflakes/issues/561. Alternatively, maybe this can be addressed with a config option like typing_namespace = t to change what name the plugin looks for.

    I was trying to run this on our projects as someone brought up an issue with the import in 3.6.0, but was surprised to see no errors reported. Not a huge deal, I can just reference the supported list in your code and do it manually for now.

    opened by davidism 2
  •  Support reading the minimum Python version from pyproject.toml

    Support reading the minimum Python version from pyproject.toml

    PEP 621 -- Storing project metadata in pyproject.toml defined a new way of defining static metadata in pyproject.toml, including the minimum supported python version, as an alternative and eventual replacement for setup.cfg. This PR will allow the minimum python version to be parsed from pyproject.toml instead.

    opened by domdfcoding 2
  • Feature/tildeequal support

    Feature/tildeequal support

    I like to configure the version in setup.cfg like ~=3.6 instead of >=3.6, <4.

    I added support with version definition with '~='. I also added a corresponding test and updated the README.

    opened by Cielquan 2
  • Python 3.9 support

    Python 3.9 support

    Hey, I am getting the following errors in the test suite on Python 3.9. Is this expected? I have looked at the code but it is not very clear to me what is failing here, if you give me some pointer I may be able to fix it.

    ============================= test session starts ==============================
    platform linux -- Python 3.9.0, pytest-6.1.2, py-1.9.0, pluggy-0.13.1
    rootdir: /build/python-flake8-typing-imports/src/flake8-typing-imports-1.10.0
    collected 26 items
    
    tests/flake8_typing_imports_test.py ............FFFFFx........           [100%]
    
    =================================== FAILURES ===================================
    _____________________ test_union_pattern_or_match[Pattern] _____________________
    
    s = 'from typing import Pattern, Union\ndef foo(bar: Union[Pattern, str]): pass\n'
    
        @pytest.mark.parametrize(
            's', (
                pytest.param(
                    'from typing import Pattern, Union\n'
                    'def foo(bar: Union[Pattern, str]): pass\n',
                    id='Pattern',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Pattern, str]): pass\n',
                    id='typing.Pattern',
                ),
                pytest.param(
                    'from typing import Match, Union\n'
                    'def foo(bar: Union[Match, str]): pass\n',
                    id='Match',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Match, str]): pass\n',
                    id='typing.Match',
                ),
                pytest.param(
                    'from typing import Match, Pattern, Union\n'
                    'def foo(bar: Union[Match, Pattern, int]): pass\n',
                    id='Match and Pattern',
                ),
                pytest.param(
                    'from typing import Match as M, Union\n'
                    'def foo(bar: Union[M, str]): pass\n',
                    id='Match imported as Name',
                    marks=pytest.mark.xfail(
                        reason=(
                            'this is broken too, but so unlikely we elect not to '
                            'detect it'
                        ),
                    ),
                ),
            ),
        )
        def test_union_pattern_or_match(s):
            with version_ctx(Version(3, 5, 0)):
    >           assert results(s) == {
                    '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] '
                    'must be quoted in <3.5.2',
                }
    E           AssertionError: assert set() == {'2:13: TYP00...ed in <3.5.2'}
    E             Extra items in the right set:
    E             '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] must be quoted in <3.5.2'
    E             Use -v to get the full diff
    
    /build/python-flake8-typing-imports/src/flake8-typing-imports-1.10.0/tests/flake8_typing_imports_test.py:170: AssertionError
    _________________ test_union_pattern_or_match[typing.Pattern] __________________
    
    s = 'import typing\ndef foo(bar: typing.Union[typing.Pattern, str]): pass\n'
    
        @pytest.mark.parametrize(
            's', (
                pytest.param(
                    'from typing import Pattern, Union\n'
                    'def foo(bar: Union[Pattern, str]): pass\n',
                    id='Pattern',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Pattern, str]): pass\n',
                    id='typing.Pattern',
                ),
                pytest.param(
                    'from typing import Match, Union\n'
                    'def foo(bar: Union[Match, str]): pass\n',
                    id='Match',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Match, str]): pass\n',
                    id='typing.Match',
                ),
                pytest.param(
                    'from typing import Match, Pattern, Union\n'
                    'def foo(bar: Union[Match, Pattern, int]): pass\n',
                    id='Match and Pattern',
                ),
                pytest.param(
                    'from typing import Match as M, Union\n'
                    'def foo(bar: Union[M, str]): pass\n',
                    id='Match imported as Name',
                    marks=pytest.mark.xfail(
                        reason=(
                            'this is broken too, but so unlikely we elect not to '
                            'detect it'
                        ),
                    ),
                ),
            ),
        )
        def test_union_pattern_or_match(s):
            with version_ctx(Version(3, 5, 0)):
    >           assert results(s) == {
                    '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] '
                    'must be quoted in <3.5.2',
                }
    E           AssertionError: assert set() == {'2:13: TYP00...ed in <3.5.2'}
    E             Extra items in the right set:
    E             '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] must be quoted in <3.5.2'
    E             Use -v to get the full diff
    
    /build/python-flake8-typing-imports/src/flake8-typing-imports-1.10.0/tests/flake8_typing_imports_test.py:170: AssertionError
    ______________________ test_union_pattern_or_match[Match] ______________________
    
    s = 'from typing import Match, Union\ndef foo(bar: Union[Match, str]): pass\n'
    
        @pytest.mark.parametrize(
            's', (
                pytest.param(
                    'from typing import Pattern, Union\n'
                    'def foo(bar: Union[Pattern, str]): pass\n',
                    id='Pattern',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Pattern, str]): pass\n',
                    id='typing.Pattern',
                ),
                pytest.param(
                    'from typing import Match, Union\n'
                    'def foo(bar: Union[Match, str]): pass\n',
                    id='Match',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Match, str]): pass\n',
                    id='typing.Match',
                ),
                pytest.param(
                    'from typing import Match, Pattern, Union\n'
                    'def foo(bar: Union[Match, Pattern, int]): pass\n',
                    id='Match and Pattern',
                ),
                pytest.param(
                    'from typing import Match as M, Union\n'
                    'def foo(bar: Union[M, str]): pass\n',
                    id='Match imported as Name',
                    marks=pytest.mark.xfail(
                        reason=(
                            'this is broken too, but so unlikely we elect not to '
                            'detect it'
                        ),
                    ),
                ),
            ),
        )
        def test_union_pattern_or_match(s):
            with version_ctx(Version(3, 5, 0)):
    >           assert results(s) == {
                    '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] '
                    'must be quoted in <3.5.2',
                }
    E           AssertionError: assert set() == {'2:13: TYP00...ed in <3.5.2'}
    E             Extra items in the right set:
    E             '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] must be quoted in <3.5.2'
    E             Use -v to get the full diff
    
    /build/python-flake8-typing-imports/src/flake8-typing-imports-1.10.0/tests/flake8_typing_imports_test.py:170: AssertionError
    __________________ test_union_pattern_or_match[typing.Match] ___________________
    
    s = 'import typing\ndef foo(bar: typing.Union[typing.Match, str]): pass\n'
    
        @pytest.mark.parametrize(
            's', (
                pytest.param(
                    'from typing import Pattern, Union\n'
                    'def foo(bar: Union[Pattern, str]): pass\n',
                    id='Pattern',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Pattern, str]): pass\n',
                    id='typing.Pattern',
                ),
                pytest.param(
                    'from typing import Match, Union\n'
                    'def foo(bar: Union[Match, str]): pass\n',
                    id='Match',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Match, str]): pass\n',
                    id='typing.Match',
                ),
                pytest.param(
                    'from typing import Match, Pattern, Union\n'
                    'def foo(bar: Union[Match, Pattern, int]): pass\n',
                    id='Match and Pattern',
                ),
                pytest.param(
                    'from typing import Match as M, Union\n'
                    'def foo(bar: Union[M, str]): pass\n',
                    id='Match imported as Name',
                    marks=pytest.mark.xfail(
                        reason=(
                            'this is broken too, but so unlikely we elect not to '
                            'detect it'
                        ),
                    ),
                ),
            ),
        )
        def test_union_pattern_or_match(s):
            with version_ctx(Version(3, 5, 0)):
    >           assert results(s) == {
                    '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] '
                    'must be quoted in <3.5.2',
                }
    E           AssertionError: assert set() == {'2:13: TYP00...ed in <3.5.2'}
    E             Extra items in the right set:
    E             '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] must be quoted in <3.5.2'
    E             Use -v to get the full diff
    
    /build/python-flake8-typing-imports/src/flake8-typing-imports-1.10.0/tests/flake8_typing_imports_test.py:170: AssertionError
    ________________ test_union_pattern_or_match[Match and Pattern] ________________
    
    s = 'from typing import Match, Pattern, Union\ndef foo(bar: Union[Match, Pattern, int]): pass\n'
    
        @pytest.mark.parametrize(
            's', (
                pytest.param(
                    'from typing import Pattern, Union\n'
                    'def foo(bar: Union[Pattern, str]): pass\n',
                    id='Pattern',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Pattern, str]): pass\n',
                    id='typing.Pattern',
                ),
                pytest.param(
                    'from typing import Match, Union\n'
                    'def foo(bar: Union[Match, str]): pass\n',
                    id='Match',
                ),
                pytest.param(
                    'import typing\n'
                    'def foo(bar: typing.Union[typing.Match, str]): pass\n',
                    id='typing.Match',
                ),
                pytest.param(
                    'from typing import Match, Pattern, Union\n'
                    'def foo(bar: Union[Match, Pattern, int]): pass\n',
                    id='Match and Pattern',
                ),
                pytest.param(
                    'from typing import Match as M, Union\n'
                    'def foo(bar: Union[M, str]): pass\n',
                    id='Match imported as Name',
                    marks=pytest.mark.xfail(
                        reason=(
                            'this is broken too, but so unlikely we elect not to '
                            'detect it'
                        ),
                    ),
                ),
            ),
        )
        def test_union_pattern_or_match(s):
            with version_ctx(Version(3, 5, 0)):
    >           assert results(s) == {
                    '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] '
                    'must be quoted in <3.5.2',
                }
    E           AssertionError: assert set() == {'2:13: TYP00...ed in <3.5.2'}
    E             Extra items in the right set:
    E             '2:13: TYP003 Union[Match, ...] or Union[Pattern, ...] must be quoted in <3.5.2'
    E             Use -v to get the full diff
    
    /build/python-flake8-typing-imports/src/flake8-typing-imports-1.10.0/tests/flake8_typing_imports_test.py:170: AssertionError
    =========================== short test summary info ============================
    FAILED tests/flake8_typing_imports_test.py::test_union_pattern_or_match[Pattern]
    FAILED tests/flake8_typing_imports_test.py::test_union_pattern_or_match[typing.Pattern]
    FAILED tests/flake8_typing_imports_test.py::test_union_pattern_or_match[Match]
    FAILED tests/flake8_typing_imports_test.py::test_union_pattern_or_match[typing.Match]
    FAILED tests/flake8_typing_imports_test.py::test_union_pattern_or_match[Match and Pattern]
    =================== 5 failed, 20 passed, 1 xfailed in 0.16s ====================
    
    bug 
    opened by FFY00 1
  • Error for Versions > 3.7.4

    Error for Versions > 3.7.4

    When I set a version in "python_requires" in setup.cfg that is > 3.7.4, which is the current max (version 1.8) in the generated 'SYMBOLS' frozenset, I get a ValueError from the Plugin.parse_options classmethod. Maybe the if-block if v not in VERSIONS can be omitted?

    I do not see a reason to keep it because on lower versions its overwritten with 3.5 and newer versions do exist.

    opened by Cielquan 1
  • False positive with some.package.typing.SomeType

    False positive with some.package.typing.SomeType

    Types imported from a package path that ends with .typing (not just the top-level typing) result in false positives.

    $ find
    .
    ./x
    ./x/typing.py
    ./x/__init__.py
    
    $ cat x/typing.py 
    ExampleType = str
    
    $ cat x/__init__.py 
    from .typing import ExampleType
    
    
    def foo(ex: ExampleType):
        pass
    
    $ flake8 x
    x/__init__.py:1:1: TYP001 guard import by `if False:  # TYPE_CHECKING`: ExampleType (not in 3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, 3.5.6, 3.5.7, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4, 3.6.5, 3.6.6, 3.6.7, 3.6.8, 3.6.9, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4)
    

    If ExampleType here is imported from somewhere else, e.g. x.blah, no such problem.

    bug 
    opened by scop 1
Owner
Anthony Sottile
@pre-commit @pytest-dev @tox-dev
Anthony Sottile
Tool for pinpointing circular imports in Python. Find cyclic imports in any project

Pycycle: Find and fix circular imports in python projects Pycycle is an experimental project that aims to help python developers fix their circular de

Vadim Kravcenko 311 Dec 15, 2022
A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle.

flake8-bugbear A plugin for Flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycode

Python Code Quality Authority 869 Dec 30, 2022
❄️ A flake8 plugin to help you write better list/set/dict comprehensions.

flake8-comprehensions A flake8 plugin that helps you write better list/set/dict comprehensions. Requirements Python 3.6 to 3.9 supported. Installation

Adam Johnson 398 Dec 23, 2022
flake8 plugin that integrates isort

Flake8 meet isort Use isort to check if the imports on your python files are sorted the way you expect. Add an .isort.cfg to define how you want your

Gil Forcada Codinachs 139 Nov 8, 2022
Flake8 plugin to find commented out or dead code

flake8-eradicate flake8 plugin to find commented out (or so called "dead") code. This is quite important for the project in a long run. Based on eradi

wemake.services 277 Dec 27, 2022
flake8 plugin to run black for checking Python coding style

flake8-black Introduction This is an MIT licensed flake8 plugin for validating Python code style with the command line code formatting tool black. It

Peter Cock 146 Dec 15, 2022
A plugin for flake8 integrating Mypy.

flake8-mypy NOTE: THIS PROJECT IS DEAD It was created in early 2017 when Mypy performance was often insufficient for in-editor linting. The Flake8 plu

Łukasz Langa 103 Jun 23, 2022
flake8 plugin to catch useless `assert` statements

flake8-useless-assert flake8 plugin to catch useless assert statements Download or install on the PyPI page Violations Code Description Example ULA001

null 1 Feb 12, 2022
A simple program which checks Python source files for errors

Pyflakes A simple program which checks Python source files for errors. Pyflakes analyzes programs and detects various errors. It works by parsing the

Python Code Quality Authority 1.2k Dec 30, 2022
A python documentation linter which checks that the docstring description matches the definition.

Darglint A functional docstring linter which checks whether a docstring's description matches the actual function/method implementation. Darglint expe

Terrence Reilly 463 Dec 31, 2022
Convert relative imports to absolute

absolufy-imports A tool and pre-commit hook to automatically convert relative imports to absolute. Installation $ pip install absolufy-imports Usage a

Marco Gorelli 130 Dec 30, 2022
Tool for automatically reordering python imports. Similar to isort but uses static analysis more.

reorder_python_imports Tool for automatically reordering python imports. Similar to isort but uses static analysis more. Installation pip install reor

Anthony Sottile 589 Dec 26, 2022
Tools for improving Python imports

imptools Tools for improving Python imports. Installation pip3 install imptools Overview Detailed docs import_path Import a module from any path on th

Danijar Hafner 7 Aug 7, 2022
Utilities for refactoring imports in python-like syntax.

aspy.refactor_imports Utilities for refactoring imports in python-like syntax. Installation pip install aspy.refactor_imports Examples aspy.refactor_i

Anthony Sottile 20 Nov 1, 2022
Optional static typing for Python 3 and 2 (PEP 484)

Mypy: Optional Static Typing for Python Got a question? Join us on Gitter! We don't have a mailing list; but we are always happy to answer questions o

Python 14.4k Jan 8, 2023
The official GitHub mirror of https://gitlab.com/pycqa/flake8

Flake8 Flake8 is a wrapper around these tools: PyFlakes pycodestyle Ned Batchelder's McCabe script Flake8 runs all the tools by launching the single f

Python Code Quality Authority 2.6k Jan 3, 2023
Flake8 extension for checking quotes in python

Flake8 Extension to lint for quotes. Major update in 2.0.0 We automatically encourage avoiding escaping quotes as per PEP 8. To disable this, use --no

Zachary Heller 157 Dec 13, 2022
Flake8 wrapper to make it nice, legacy-friendly, configurable.

THE PROJECT IS ARCHIVED Forks: https://github.com/orsinium/forks It's a Flake8 wrapper to make it cool. Lint md, rst, ipynb, and more. Shareable and r

Life4 232 Dec 16, 2022
Automated security testing using bandit and flake8.

flake8-bandit Automated security testing built right into your workflow! You already use flake8 to lint all your code for errors, ensure docstrings ar

Tyler Wince 96 Jan 1, 2023