running install /usr/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py running install_lib creating /build/flake8/src/flake8-4.0.1/tmp_install creating /build/flake8/src/flake8-4.0.1/tmp_install/usr creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10 creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins copying build/lib/flake8/plugins/pyflakes.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins copying build/lib/flake8/plugins/__init__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins copying build/lib/flake8/plugins/manager.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting copying build/lib/flake8/formatting/__init__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting copying build/lib/flake8/formatting/default.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting copying build/lib/flake8/formatting/base.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting copying build/lib/flake8/checker.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/__init__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/utils.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/statistics.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options copying build/lib/flake8/options/aggregator.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options copying build/lib/flake8/options/__init__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options copying build/lib/flake8/options/config.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options copying build/lib/flake8/options/manager.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/api copying build/lib/flake8/api/legacy.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/api copying build/lib/flake8/api/__init__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/api copying build/lib/flake8/_compat.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/defaults.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/style_guide.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/processor.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 creating /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main copying build/lib/flake8/main/__init__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main copying build/lib/flake8/main/cli.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main copying build/lib/flake8/main/debug.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main copying build/lib/flake8/main/options.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main copying build/lib/flake8/main/application.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main copying build/lib/flake8/exceptions.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 copying build/lib/flake8/__main__.py -> /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8 byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/pyflakes.py to pyflakes.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/__init__.py to __init__.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py to manager.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting/__init__.py to __init__.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting/default.py to default.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/formatting/base.py to base.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/checker.py to checker.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/__init__.py to __init__.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/utils.py to utils.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/statistics.py to statistics.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options/aggregator.py to aggregator.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options/__init__.py to __init__.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options/config.py to config.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/options/manager.py to manager.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/api/legacy.py to legacy.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/api/__init__.py to __init__.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/_compat.py to _compat.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/defaults.py to defaults.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/style_guide.py to style_guide.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/processor.py to processor.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main/__init__.py to __init__.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py to cli.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main/debug.py to debug.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main/options.py to options.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py to application.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/exceptions.py to exceptions.cpython-310.pyc byte-compiling /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/__main__.py to __main__.cpython-310.pyc writing byte-compilation script '/tmp/tmpfh9v1yxy.py' /usr/bin/python -Wignore:The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives:DeprecationWarning /tmp/tmpfh9v1yxy.py removing /tmp/tmpfh9v1yxy.py running install_egg_info running egg_info creating src/flake8.egg-info writing src/flake8.egg-info/PKG-INFO writing dependency_links to src/flake8.egg-info/dependency_links.txt writing entry points to src/flake8.egg-info/entry_points.txt writing requirements to src/flake8.egg-info/requires.txt writing top-level names to src/flake8.egg-info/top_level.txt writing manifest file 'src/flake8.egg-info/SOURCES.txt' reading manifest file 'src/flake8.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no previously-included files matching '*.pyc' found anywhere in distribution no previously-included directories found matching 'docs/build/' adding license file 'LICENSE' writing manifest file 'src/flake8.egg-info/SOURCES.txt' Copying src/flake8.egg-info to /build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8-4.0.1-py3.10.egg-info running install_scripts Installing flake8 script to /build/flake8/src/flake8-4.0.1/tmp_install/usr/bin ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 rootdir: /build/flake8/src/flake8-4.0.1, configfile: pytest.ini collected 481 items tests/integration/test_aggregator.py .. [ 0%] tests/integration/test_api_legacy.py F [ 0%] tests/integration/test_checker.py ...................... [ 5%] tests/integration/test_main.py FFFFFFFFFFFFFFFFFFF [ 9%] tests/integration/test_plugins.py FFF [ 9%] tests/unit/test_application.py ............ [ 12%] tests/unit/test_base_formatter.py .............. [ 15%] tests/unit/test_checker_manager.py .... [ 16%] tests/unit/test_config_file_finder.py ............... [ 19%] tests/unit/test_config_parser.py .......... [ 21%] tests/unit/test_debug.py ........ [ 22%] tests/unit/test_decision_engine.py ..................................... [ 30%] ....................................... [ 38%] tests/unit/test_exceptions.py ... [ 39%] tests/unit/test_file_checker.py ... [ 39%] tests/unit/test_file_processor.py ...................................... [ 47%] ..................................... [ 55%] tests/unit/test_filenameonly_formatter.py ... [ 56%] tests/unit/test_get_local_plugins.py ... [ 56%] tests/unit/test_legacy_api.py ............ [ 59%] tests/unit/test_nothing_formatter.py .. [ 59%] tests/unit/test_option.py ...... [ 60%] tests/unit/test_option_manager.py ................................. [ 67%] tests/unit/test_plugin.py ............. [ 70%] tests/unit/test_plugin_manager.py .... [ 71%] tests/unit/test_plugin_type_manager.py .......... [ 73%] tests/unit/test_pyflakes_codes.py .. [ 73%] tests/unit/test_statistics.py ................... [ 77%] tests/unit/test_style_guide.py .................... [ 81%] tests/unit/test_utils.py ............................................... [ 91%] .............. [ 94%] tests/unit/test_violation.py .......................... [100%] =================================== FAILURES =================================== _______________________________ test_legacy_api ________________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_legacy_api0') def test_legacy_api(tmpdir): """A basic end-to-end test for the legacy api reporting errors.""" with tmpdir.as_cwd(): t_py = tmpdir.join("t.py") t_py.write("import os # unused import\n") > style_guide = legacy.get_style_guide() tests/integration/test_api_legacy.py:11: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmp_install/usr/lib/python3.10/site-packages/flake8/api/legacy.py:41: in get_style_guide application.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _______________________________ test_diff_option _______________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_diff_option0') capsys = <_pytest.capture.CaptureFixture object at 0x400352d7e0> def test_diff_option(tmpdir, capsys): """Ensure that `flake8 --diff` works.""" t_py_contents = """\ import os import sys # unused but not part of diff print('(to avoid trailing whitespace in test)') print('(to avoid trailing whitespace in test)') print(os.path.join('foo', 'bar')) y # part of the diff and an error """ diff = """\ diff --git a/t.py b/t.py index d64ac39..7d943de 100644 --- a/t.py +++ b/t.py @@ -4,3 +4,5 @@ import sys # unused but not part of diff print('(to avoid trailing whitespace in test)') print('(to avoid trailing whitespace in test)') print(os.path.join('foo', 'bar')) + +y # part of the diff and an error """ with mock.patch.object(utils, "stdin_get_value", return_value=diff): with tmpdir.as_cwd(): tmpdir.join("t.py").write(t_py_contents) > _call_main(["--diff"], retv=1) tests/integration/test_main.py:48: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. __________________________ test_form_feed_line_split ___________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_form_feed_line_split0') capsys = <_pytest.capture.CaptureFixture object at 0x40035f9510> def test_form_feed_line_split(tmpdir, capsys): """Test that form feed is treated the same for stdin.""" src = "x=1\n\f\ny=1\n" expected_out = """\ t.py:1:2: E225 missing whitespace around operator t.py:3:2: E225 missing whitespace around operator """ with tmpdir.as_cwd(): tmpdir.join("t.py").write(src) with mock.patch.object(utils, "stdin_get_value", return_value=src): > _call_main(["-", "--stdin-display-name=t.py"], retv=1) tests/integration/test_main.py:67: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _____________________ test_e101_indent_char_does_not_reset _____________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_e101_indent_char_does_not0') capsys = <_pytest.capture.CaptureFixture object at 0x40023c7bb0> def test_e101_indent_char_does_not_reset(tmpdir, capsys): """Ensure that E101 with an existing indent_char does not reset it.""" t_py_contents = """\ if True: print('space indented') s = '''\ \ttab indented ''' # noqa: E101 if True: print('space indented') """ with tmpdir.as_cwd(): tmpdir.join("t.py").write(t_py_contents) > _call_main(["t.py"]) tests/integration/test_main.py:94: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ____________________________ test_statistics_option ____________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_statistics_option0') capsys = <_pytest.capture.CaptureFixture object at 0x400394b850> def test_statistics_option(tmpdir, capsys): """Ensure that `flake8 --statistics` works.""" with tmpdir.as_cwd(): tmpdir.join("t.py").write("import os\nimport sys\n") > _call_main(["--statistics", "t.py"], retv=1) tests/integration/test_main.py:101: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ___________________________ test_show_source_option ____________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_show_source_option0') capsys = <_pytest.capture.CaptureFixture object at 0x40035852d0> def test_show_source_option(tmpdir, capsys): """Ensure that --show-source and --no-show-source work.""" with tmpdir.as_cwd(): tmpdir.join("tox.ini").write("[flake8]\nshow_source = true\n") tmpdir.join("t.py").write("import os\n") > _call_main(["t.py"], retv=1) tests/integration/test_main.py:118: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:128 Found local configuration files: ['/tmp/pytest-of-builduser/pytest-0/test_show_source_option0/tox.ini'] INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _____________________________ test_extend_exclude ______________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_extend_exclude0') capsys = <_pytest.capture.CaptureFixture object at 0x40037ac850> def test_extend_exclude(tmpdir, capsys): """Ensure that `flake8 --extend-exclude` works.""" for d in ["project", "vendor", "legacy", ".git", ".tox", ".hg"]: tmpdir.mkdir(d).join("t.py").write("import os\nimport sys\n") with tmpdir.as_cwd(): > _call_main(["--extend-exclude=vendor,legacy/"], retv=1) tests/integration/test_main.py:146: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ____________________ test_malformed_per_file_ignores_error _____________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_malformed_per_file_ignore0') capsys = <_pytest.capture.CaptureFixture object at 0x4003aebac0> def test_malformed_per_file_ignores_error(tmpdir, capsys): """Test the error message for malformed `per-file-ignores`.""" setup_cfg = """\ [flake8] per-file-ignores = incorrect/* values/* """ expected = """\ There was a critical error during execution of Flake8: Expected `per-file-ignores` to be a mapping from file exclude patterns to ignore codes. Configured `per-file-ignores` setting: incorrect/* values/* """ # noqa: E501 with tmpdir.as_cwd(): tmpdir.join("setup.cfg").write(setup_cfg) > _call_main(["."], retv=1) tests/integration/test_main.py:177: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:128 Found local configuration files: ['/tmp/pytest-of-builduser/pytest-0/test_malformed_per_file_ignore0/setup.cfg'] INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _________________ test_tokenization_error_but_not_syntax_error _________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_tokenization_error_but_no0') capsys = <_pytest.capture.CaptureFixture object at 0x40036d9cf0> def test_tokenization_error_but_not_syntax_error(tmpdir, capsys): """Test that flake8 does not crash on tokenization errors.""" with tmpdir.as_cwd(): # this is a crash in the tokenizer, but not in the ast tmpdir.join("t.py").write("b'foo' \\\n") > _call_main(["t.py"], retv=1) tests/integration/test_main.py:188: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. __________________ test_tokenization_error_is_a_syntax_error ___________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_tokenization_error_is_a_s0') capsys = <_pytest.capture.CaptureFixture object at 0x40035f8190> def test_tokenization_error_is_a_syntax_error(tmpdir, capsys): """Test when tokenize raises a SyntaxError.""" with tmpdir.as_cwd(): tmpdir.join("t.py").write("if True:\n pass\n pass\n") > _call_main(["t.py"], retv=1) tests/integration/test_main.py:208: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. __________________________ test_bug_report_successful __________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: capsys = <_pytest.capture.CaptureFixture object at 0x4003aea4d0> def test_bug_report_successful(capsys): """Test that --bug-report does not crash.""" > _call_main(["--bug-report"]) tests/integration/test_main.py:224: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:128 Found local configuration files: ['/build/flake8/src/flake8-4.0.1/setup.cfg', '/build/flake8/src/flake8-4.0.1/tox.ini'] INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _____________ test_specific_noqa_does_not_clobber_pycodestyle_noqa _____________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_specific_noqa_does_not_cl0') capsys = <_pytest.capture.CaptureFixture object at 0x40039aadd0> def test_specific_noqa_does_not_clobber_pycodestyle_noqa(tmpdir, capsys): """See https://github.com/pycqa/flake8/issues/1104.""" with tmpdir.as_cwd(): tmpdir.join("t.py").write("test = ('ABC' == None) # noqa: E501\n") > _call_main(["t.py"], retv=1) tests/integration/test_main.py:234: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _________________ test_specific_noqa_on_line_with_continuation _________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_specific_noqa_on_line_wit0') capsys = <_pytest.capture.CaptureFixture object at 0x40035f96f0> def test_specific_noqa_on_line_with_continuation(tmpdir, capsys): """See https://github.com/pycqa/flake8/issues/621.""" t_py_src = '''\ from os \\ import path # noqa: F401 x = """ trailing whitespace: \n """ # noqa: W291 ''' with tmpdir.as_cwd(): tmpdir.join("t.py").write(t_py_src) > _call_main(["t.py"], retv=0) tests/integration/test_main.py:256: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ________________ test_physical_line_file_not_ending_in_newline _________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_physical_line_file_not_en0') capsys = <_pytest.capture.CaptureFixture object at 0x40023c6290> def test_physical_line_file_not_ending_in_newline(tmpdir, capsys): """See https://github.com/PyCQA/pycodestyle/issues/960.""" t_py_src = "def f():\n\tpass" with tmpdir.as_cwd(): tmpdir.join("t.py").write(t_py_src) > _call_main(["t.py"], retv=1) tests/integration/test_main.py:268: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. __________ test_physical_line_file_not_ending_in_newline_trailing_ws ___________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_physical_line_file_not_en1') capsys = <_pytest.capture.CaptureFixture object at 0x4003933d30> def test_physical_line_file_not_ending_in_newline_trailing_ws(tmpdir, capsys): """See https://github.com/PyCQA/pycodestyle/issues/960.""" t_py_src = "x = 1 " with tmpdir.as_cwd(): tmpdir.join("t.py").write(t_py_src) > _call_main(["t.py"], retv=1) tests/integration/test_main.py:284: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ________ test_obtaining_args_from_sys_argv_when_not_explicity_provided _________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: capsys = <_pytest.capture.CaptureFixture object at 0x40035f8280> def test_obtaining_args_from_sys_argv_when_not_explicity_provided(capsys): """Test that arguments are obtained from 'sys.argv'.""" with mock.patch("sys.argv", ["flake8", "--help"]): > _call_main(None) tests/integration/test_main.py:297: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:128 Found local configuration files: ['/build/flake8/src/flake8-4.0.1/setup.cfg', '/build/flake8/src/flake8-4.0.1/tox.ini'] INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _______________________ test_cli_config_option_respected _______________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_cli_config_option_respect0') def test_cli_config_option_respected(tmp_path): """Test --config is used.""" config = tmp_path / "flake8.ini" config.write_text( """\ [flake8] ignore = F401 """ ) py_file = tmp_path / "t.py" py_file.write_text("import os\n") > _call_main(["--config", str(config), str(py_file)]) tests/integration/test_main.py:317: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:281 Reading local plugins only from "/tmp/pytest-of-builduser/pytest-0/test_cli_config_option_respect0/flake8.ini" specified via --config by the user DEBUG flake8.options.config:config.py:85 Found cli configuration files: ['/tmp/pytest-of-builduser/pytest-0/test_cli_config_option_respect0/flake8.ini'] INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. __________________ test_cli_isolated_overrides_config_option ___________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmp_path = PosixPath('/tmp/pytest-of-builduser/pytest-0/test_cli_isolated_overrides_co0') def test_cli_isolated_overrides_config_option(tmp_path): """Test --isolated overrides --config.""" config = tmp_path / "flake8.ini" config.write_text( """\ [flake8] ignore = F401 """ ) py_file = tmp_path / "t.py" py_file.write_text("import os\n") > _call_main(["--isolated", "--config", str(config), str(py_file)], retv=1) tests/integration/test_main.py:333: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:274 Refusing to look for local plugins in configurationfiles due to user-requested isolation INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _____________________________ test_file_not_found ______________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_file_not_found0') capsys = <_pytest.capture.CaptureFixture object at 0x400359a470> def test_file_not_found(tmpdir, capsys): """Ensure that a not-found file / directory is an error.""" with tmpdir.as_cwd(): > _call_main(["i-do-not-exist"], retv=1) tests/integration/test_main.py:339: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _______________________________ test_output_file _______________________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: tmpdir = local('/tmp/pytest-of-builduser/pytest-0/test_output_file0') capsys = <_pytest.capture.CaptureFixture object at 0x4003742290> def test_output_file(tmpdir, capsys): """Ensure that --output-file is honored.""" tmpdir.join("t.py").write("import os\n") with tmpdir.as_cwd(): > _call_main(["t.py", "--output-file=a/b/f"], retv=1) tests/integration/test_main.py:350: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/integration/test_main.py:15: in _call_main cli.main(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/cli.py:22: in main app.run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:375: in run self._run(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:363: in _run self.initialize(argv) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _____________________ test_enable_local_plugin_from_config _____________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: def test_enable_local_plugin_from_config(): """App can load a local plugin from config file.""" app = application.Application() > app.initialize(["flake8", "--config", LOCAL_PLUGIN_CONFIG]) tests/integration/test_plugins.py:42: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:281 Reading local plugins only from "tests/fixtures/config_files/local-plugin.ini" specified via --config by the user DEBUG flake8.options.config:config.py:85 Found cli configuration files: ['tests/fixtures/config_files/local-plugin.ini'] DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="XE", entry_point="test_plugins:ExtensionTestPlugin") for plugin "XE". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="XR", entry_point="test_plugins:ReportTestPlugin") for plugin "XR". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "XE" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. _______________________ test_local_plugin_can_add_option _______________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: def test_local_plugin_can_add_option(): """A local plugin can add a CLI option.""" app = application.Application() > app.initialize( ["flake8", "--config", LOCAL_PLUGIN_CONFIG, "--anopt", "foo"] ) tests/integration/test_plugins.py:53: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:281 Reading local plugins only from "tests/fixtures/config_files/local-plugin.ini" specified via --config by the user DEBUG flake8.options.config:config.py:85 Found cli configuration files: ['tests/fixtures/config_files/local-plugin.ini'] DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="XE", entry_point="test_plugins:ExtensionTestPlugin") for plugin "XE". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="XR", entry_point="test_plugins:ReportTestPlugin") for plugin "XR". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "XE" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ________________ test_enable_local_plugin_at_non_installed_path ________________ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: > self._load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:161: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def _load(self): > self._plugin = self.entry_point.load() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:138: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = EntryPoint(name='pycodestyle.ambiguous_identifier', value='pycodestyle:ambiguous_identifier', group='flake8.extension') def load(self): """Load the entry point from its definition. If only a module is indicated by the value, return that module. Otherwise, return the named object. """ match = self.pattern.match(self.value) > module = import_module(match.group('module')) /usr/lib/python3.10/importlib/metadata/__init__.py:162: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None def import_module(name, package=None): """Import a module. The 'package' argument is required when performing a relative import. It specifies the package to use as the anchor point from which to resolve the relative import to an absolute import. """ level = 0 if name.startswith('.'): if not package: msg = ("the 'package' argument is required to perform a relative " "import for {!r}") raise TypeError(msg.format(name)) for character in name: if character != '.': break level += 1 > return _bootstrap._gcd_import(name[level:], package, level) /usr/lib/python3.10/importlib/__init__.py:126: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', package = None, level = 0 > ??? :1050: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? :1027: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ name = 'pycodestyle', import_ = > ??? E ModuleNotFoundError: No module named 'pycodestyle' :1004: ModuleNotFoundError During handling of the above exception, another exception occurred: def test_enable_local_plugin_at_non_installed_path(): """Can add a paths option in local-plugins config section for finding.""" app = application.Application() > app.initialize(["flake8", "--config", LOCAL_PLUGIN_PATH_CONFIG]) tests/integration/test_plugins.py:64: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:343: in initialize self.find_plugins(config_finder) tmp_install/usr/lib/python3.10/site-packages/flake8/main/application.py:163: in find_plugins self.check_plugins.load_plugins() tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:422: in load_plugins plugins = list(self.manager.map(load_plugin)) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:309: in map yield func(self.plugins[name], *args, **kwargs) tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:420: in load_plugin return plugin.load_plugin() _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") def load_plugin(self): """Retrieve the plugin for this entry-point. This loads the plugin, stores it on the instance and then returns it. It does not reload it after the first time, it merely returns the cached plugin. :returns: Nothing """ if self._plugin is None: LOG.info('Loading plugin "%s" from entry-point.', self.name) try: self._load() except Exception as load_exception: LOG.exception(load_exception) failed_to_load = exceptions.FailedToLoadPlugin( plugin_name=self.name, exception=load_exception ) LOG.critical(str(failed_to_load)) > raise failed_to_load E flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py:168: FailedToLoadPlugin ------------------------------ Captured log call ------------------------------- DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-q, --quiet, action='count', default=0, help='Report only file names, or nothing. This option is repeatable.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--count, action='store_true', help='Print total number of errors and warnings to standard error and set the exit code to 1 if total is not empty.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--diff, action='store_true', help='Report changes only within line number ranges in the unified diff provided on standard in by the user.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exclude, default='.svn,CVS,.bzr,.hg,.git,__pycache__,.tox,.eggs,*.egg', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to exclude. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-exclude, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=True), help='Comma-separated list of files or directories to add to the list of excluded ones.', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--filename, default='*.py', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Only check for filenames matching the patterns in this comma-separated list. (Default: %(default)s)', metavar='patterns')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--stdin-display-name, default='stdin', 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--format, default='default', help='Format errors according to the chosen formatter.', metavar='format')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--hang-closing, action='store_true', help="Hang closing bracket instead of matching indentation of opening bracket's line.")". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--ignore, default='E121,E123,E126,E226,E24,E704,W503,W504', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to ignore (or skip). For example, ``--ignore=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-ignore, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of ignored ones. For example, ``--extend-ignore=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--per-file-ignores, default='', 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.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-line-length, default=79, type=, help='Maximum allowed line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--max-doc-length, default=None, type=, help='Maximum allowed doc line length for the entirety of this run. (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--indent-size, default=4, type=, help='Number of spaces used for indentation (Default: %(default)s)', metavar='n')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--select, default='E,F,W,C90', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to enable. For example, ``--select=E4,E51,W234``. (Default: %(default)s)', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--extend-select, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Comma-separated list of errors and warnings to add to the list of selected ones. For example, ``--extend-select=E4,E51,W234``.', metavar='errors')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--disable-noqa, action='store_true', default=False, help='Disable the effect of "# noqa". This will report errors on lines with "# noqa" at the end.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--show-source, action='store_true', help='Show the source generate each error or warning.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--no-show-source, action='store_false', dest='show_source', help='Negate --show-source')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--statistics, action='store_true', help='Count errors and warnings.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--enable-extensions, default='', type=functools.partial(, comma_separated_list=True, normalize_paths=False), help='Enable plugins and extensions that are otherwise disabled by default')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--exit-zero, action='store_true', help='Exit with status code "0" even if there are errors.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(-j, --jobs, default='auto', type=, 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)s)')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--tee, action='store_true', default=False, help='Write to stdout and output-file.')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--benchmark, action='store_true', default=False, help='Print benchmark information about this run of Flake8')". DEBUG flake8.options.manager:manager.py:424 Registered option "Option(--bug-report, action=functools.partial(, option_manager=), nargs=0, help='Print information necessary when preparing a bug report')". DEBUG flake8.options.config:config.py:281 Reading local plugins only from "tests/fixtures/config_files/local-plugin-path.ini" specified via --config by the user DEBUG flake8.options.config:config.py:85 Found cli configuration files: ['tests/fixtures/config_files/local-plugin-path.ini'] DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="XE", entry_point="aplugin:ExtensionTestPlugin2") for plugin "XE". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.extension". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="F", entry_point="flake8.plugins.pyflakes:FlakesChecker") for plugin "F". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.ambiguous_identifier", entry_point="pycodestyle:ambiguous_identifier") for plugin "pycodestyle.ambiguous_identifier". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.bare_except", entry_point="pycodestyle:bare_except") for plugin "pycodestyle.bare_except". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.blank_lines", entry_point="pycodestyle:blank_lines") for plugin "pycodestyle.blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_after_binary_operator", entry_point="pycodestyle:break_after_binary_operator") for plugin "pycodestyle.break_after_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.break_before_binary_operator", entry_point="pycodestyle:break_before_binary_operator") for plugin "pycodestyle.break_before_binary_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_negative", entry_point="pycodestyle:comparison_negative") for plugin "pycodestyle.comparison_negative". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_to_singleton", entry_point="pycodestyle:comparison_to_singleton") for plugin "pycodestyle.comparison_to_singleton". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.comparison_type", entry_point="pycodestyle:comparison_type") for plugin "pycodestyle.comparison_type". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.compound_statements", entry_point="pycodestyle:compound_statements") for plugin "pycodestyle.compound_statements". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.continued_indentation", entry_point="pycodestyle:continued_indentation") for plugin "pycodestyle.continued_indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.explicit_line_join", entry_point="pycodestyle:explicit_line_join") for plugin "pycodestyle.explicit_line_join". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.extraneous_whitespace", entry_point="pycodestyle:extraneous_whitespace") for plugin "pycodestyle.extraneous_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.imports_on_separate_lines", entry_point="pycodestyle:imports_on_separate_lines") for plugin "pycodestyle.imports_on_separate_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.indentation", entry_point="pycodestyle:indentation") for plugin "pycodestyle.indentation". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_doc_length", entry_point="pycodestyle:maximum_doc_length") for plugin "pycodestyle.maximum_doc_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.maximum_line_length", entry_point="pycodestyle:maximum_line_length") for plugin "pycodestyle.maximum_line_length". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace", entry_point="pycodestyle:missing_whitespace") for plugin "pycodestyle.missing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_after_import_keyword", entry_point="pycodestyle:missing_whitespace_after_import_keyword") for plugin "pycodestyle.missing_whitespace_after_import_keyword". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.missing_whitespace_around_operator", entry_point="pycodestyle:missing_whitespace_around_operator") for plugin "pycodestyle.missing_whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.module_imports_on_top_of_file", entry_point="pycodestyle:module_imports_on_top_of_file") for plugin "pycodestyle.module_imports_on_top_of_file". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_async_await_keywords", entry_point="pycodestyle:python_3000_async_await_keywords") for plugin "pycodestyle.python_3000_async_await_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_backticks", entry_point="pycodestyle:python_3000_backticks") for plugin "pycodestyle.python_3000_backticks". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_has_key", entry_point="pycodestyle:python_3000_has_key") for plugin "pycodestyle.python_3000_has_key". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_invalid_escape_sequence", entry_point="pycodestyle:python_3000_invalid_escape_sequence") for plugin "pycodestyle.python_3000_invalid_escape_sequence". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_not_equal", entry_point="pycodestyle:python_3000_not_equal") for plugin "pycodestyle.python_3000_not_equal". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.python_3000_raise_comma", entry_point="pycodestyle:python_3000_raise_comma") for plugin "pycodestyle.python_3000_raise_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_obsolete", entry_point="pycodestyle:tabs_obsolete") for plugin "pycodestyle.tabs_obsolete". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.tabs_or_spaces", entry_point="pycodestyle:tabs_or_spaces") for plugin "pycodestyle.tabs_or_spaces". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_blank_lines", entry_point="pycodestyle:trailing_blank_lines") for plugin "pycodestyle.trailing_blank_lines". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.trailing_whitespace", entry_point="pycodestyle:trailing_whitespace") for plugin "pycodestyle.trailing_whitespace". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_comma", entry_point="pycodestyle:whitespace_around_comma") for plugin "pycodestyle.whitespace_around_comma". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_keywords", entry_point="pycodestyle:whitespace_around_keywords") for plugin "pycodestyle.whitespace_around_keywords". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_named_parameter_equals", entry_point="pycodestyle:whitespace_around_named_parameter_equals") for plugin "pycodestyle.whitespace_around_named_parameter_equals". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_around_operator", entry_point="pycodestyle:whitespace_around_operator") for plugin "pycodestyle.whitespace_around_operator". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_comment", entry_point="pycodestyle:whitespace_before_comment") for plugin "pycodestyle.whitespace_before_comment". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pycodestyle.whitespace_before_parameters", entry_point="pycodestyle:whitespace_before_parameters") for plugin "pycodestyle.whitespace_before_parameters". INFO flake8.plugins.manager:manager.py:260 Loading entry-points for "flake8.report". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="default", entry_point="flake8.formatting.default:Default") for plugin "default". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="pylint", entry_point="flake8.formatting.default:Pylint") for plugin "pylint". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-filename", entry_point="flake8.formatting.default:FilenameOnly") for plugin "quiet-filename". DEBUG flake8.plugins.manager:manager.py:285 Loaded Plugin(name="quiet-nothing", entry_point="flake8.formatting.default:Nothing") for plugin "quiet-nothing". INFO flake8.plugins.manager:manager.py:159 Loading plugin "XE" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "F" from entry-point. INFO flake8.plugins.manager:manager.py:159 Loading plugin "pycodestyle.ambiguous_identifier" from entry-point. ERROR flake8.plugins.manager:manager.py:163 No module named 'pycodestyle' Traceback (most recent call last): File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 161, in load_plugin self._load() File "/build/flake8/src/flake8-4.0.1/tmp_install/usr/lib/python3.10/site-packages/flake8/plugins/manager.py", line 138, in _load self._plugin = self.entry_point.load() File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load module = import_module(match.group('module')) File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import File "", line 1027, in _find_and_load File "", line 1004, in _find_and_load_unlocked ModuleNotFoundError: No module named 'pycodestyle' CRITICAL flake8.plugins.manager:manager.py:167 Flake8 failed to load plugin "pycodestyle.ambiguous_identifier" due to No module named 'pycodestyle'. ======================= 23 failed, 458 passed in 46.69s ======================== ==> ERROR: A failure occurred in check().  Aborting...