Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flake8 error on Darker repo #733

Open
akaihola opened this issue Aug 25, 2024 · 0 comments
Open

Flake8 error on Darker repo #733

akaihola opened this issue Aug 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working CI
Milestone

Comments

@akaihola
Copy link
Owner

In build #1042:

Run TrueBrain/actions-flake8@v2
  with:
    plugins: flake8-2020>=1.6.1 flake8-bugbear>=22.1.11 flake8-comprehensions>=3.7.0
  
    error_classes: E,F
    working_directory: .
Run if [ -z "" ]; then
  if [ -z "" ]; then
    flake8_version=""
  else
    flake8_version="=="
  fi
  plugins=
  if [ -n "flake8-2020>=1.6.1 flake8-bugbear>=22.1.11 flake8-comprehensions>=3.7.0
  " ]; then
    plugins="flake8-2020>=1.6.1 flake8-bugbear>=22.1.11 flake8-comprehensions>=3.7.0
  "
  fi
  pip install flake8${flake8_version} ${plugins}
  shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
Defaulting to user installation because normal site-packages is not writeable
Collecting flake8
  Downloading flake8-7.1.1-py2.py3-none-any.whl (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.7/57.7 KB 4.3 MB/s eta 0:00:00
Collecting flake8-2020>=1.6.1
  Downloading flake8_2020-1.8.1-py2.py3-none-any.whl (4.9 kB)
Collecting flake8-bugbear>=22.1.11
  Downloading flake8_bugbear-24.8.19-py3-none-any.whl (35 kB)
Collecting flake8-comprehensions>=3.7.0
  Downloading flake8_comprehensions-3.15.0-py3-none-any.whl (8.2 kB)
Collecting mccabe<0.8.0,>=0.7.0
  Downloading mccabe-0.7.0-py2.py3-none-any.whl (7.3 kB)
Collecting pycodestyle<2.13.0,>=2.12.0
  Downloading pycodestyle-2.12.1-py2.py3-none-any.whl (31 kB)
Collecting pyflakes<3.3.0,>=3.2.0
  Downloading pyflakes-3.2.0-py2.py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 KB 29.8 MB/s eta 0:00:00
Requirement already satisfied: attrs>=19.2.0 in /usr/lib/python3/dist-packages (from flake8-bugbear>=22.1.11) (21.2.0)
Installing collected packages: pyflakes, pycodestyle, mccabe, flake8, flake8-comprehensions, flake8-bugbear, flake8-2020
Successfully installed flake8-7.1.1 flake8-2020-1.8.1 flake8-bugbear-24.8.19 flake8-comprehensions-3.15.0 mccabe-0.7.0 pycodestyle-2.12.1 pyflakes-3.2.0
Run /home/runner/work/_actions/TrueBrain/actions-flake8/v2/action/entrypoint.sh
 - error_classes: 'E,F'
 - warning_classes: ''
Running flake8 on '' with the following options:
 - ignoring: ''
 - max line length: ''
 - path: ''
 - extra arguments: ''
Resulting command: flake8  
Traceback (most recent call last):
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/plugins/finder.py", line 291, in _load_plugin
    obj = plugin.entry_point.load()
  File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 171, 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 "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/runner/.local/lib/python3.10/site-packages/bugbear.py", line 49, in <module>
    @attr.s(unsafe_hash=False)
TypeError: attrs() got an unexpected keyword argument 'unsafe_hash'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/.local/bin/flake8", line 8, in <module>
    sys.exit(main())
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/main/cli.py", line 23, in main
    app.run(argv)
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/main/application.py", line 198, in run
    self._run(argv)
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/main/application.py", line 186, in _run
    self.initialize(argv)
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/main/application.py", line 165, in initialize
    self.plugins, self.options = parse_args(argv)
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/options/parse_args.py", line 42, in parse_args
    plugins = finder.load_plugins(raw_plugins, plugin_opts)
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/plugins/finder.py", line 365, in load_plugins
    return _classify_plugins(_import_plugins(plugins, opts), opts)
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/plugins/finder.py", line 307, in _import_plugins
    return [_load_plugin(p) for p in plugins]
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/plugins/finder.py", line 307, in <listcomp>
    return [_load_plugin(p) for p in plugins]
  File "/home/runner/.local/lib/python3.10/site-packages/flake8/plugins/finder.py", line 293, in _load_plugin
    raise FailedToLoadPlugin(plugin.package, e)
flake8.exceptions.FailedToLoadPlugin: Flake8 failed to load plugin "flake8-bugbear" due to attrs() got an unexpected keyword argument 'unsafe_hash'.
Flake8 found one or more problems
Error: Process completed with exit code 1.
@akaihola akaihola added bug Something isn't working CI labels Aug 25, 2024
@akaihola akaihola added this to the Darker 3.0.1 milestone Aug 25, 2024
@akaihola akaihola self-assigned this Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI
Projects
Development

No branches or pull requests

1 participant