Skip to content

latest flake8 breaks tox test #1226

@n2ygk

Description

@n2ygk

Describe the bug

See PyCQA/flake8#1760

[1945] /home/runner/work/django-oauth-toolkit/django-oauth-toolkit$ /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/bin/python -m pip freeze >.tox/flake8/log/flake8-2.log
  flake8 installed: black==[22](https://github.com/jazzband/django-oauth-toolkit/actions/runs/3561033540/jobs/5998584170#step:7:23).10.0,click==8.1.3,django-oauth-toolkit==2.2.0,flake8==6.0.0,flake8-black==0.3.5,flake8-isort==5.0.3,flake8-quotes==3.3.1,isort==5.10.1,mccabe==0.7.0,mypy-extensions==0.4.3,pathspec==0.10.2,platformdirs==2.5.4,pycodestyle==2.10.0,pyflakes==3.0.1,tomli==2.0.1,typing_extensions==4.4.0
  flake8 run-test-pre: PYTHONHASHSEED='677894681'
  flake8 run-test: commands[0] | flake8 /home/runner/work/django-oauth-toolkit/django-oauth-toolkit
  [1948] /home/runner/work/django-oauth-toolkit/django-oauth-toolkit$ /home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/bin/flake8 .
  Traceback (most recent call last):
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/bin/flake8", line 8, in <module>
      sys.exit(main())
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/main/cli.py", line [23](https://github.com/jazzband/django-oauth-toolkit/actions/runs/3561033540/jobs/5998584170#step:7:24), in main
      app.run(argv)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/main/application.py", line 198, in run
      self._run(argv)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/main/application.py", line 186, in _run
      self.initialize(argv)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/main/application.py", line 165, in initialize
      self.plugins, self.options = parse_args(argv)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/options/parse_args.py", line 51, in parse_args
      option_manager.register_plugins(plugins)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/options/manager.py", line [25](https://github.com/jazzband/django-oauth-toolkit/actions/runs/3561033540/jobs/5998584170#step:7:26)9, in register_plugins
      add_options(self)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8_quotes/__init__.py", line 109, in add_options
      cls._register_opt(parser, '--quotes', action='store',
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8_quotes/__init__.py", line 99, in _register_opt
      parser.add_option(*args, **kwargs)
    File "/home/runner/work/django-oauth-toolkit/django-oauth-toolkit/.tox/flake8/lib/python3.8/site-packages/flake8/options/manager.py", line [28](https://github.com/jazzband/django-oauth-toolkit/actions/runs/3561033540/jobs/5998584170#step:7:29)1, in add_option
      self._current_group.add_argument(*option_args, **option_kwargs)
    File "/opt/hostedtoolcache/Python/3.8.14/x64/lib/python3.8/argparse.py", line 1[37](https://github.com/jazzband/django-oauth-toolkit/actions/runs/3561033540/jobs/5998584170#step:7:38)3, in add_argument
      raise ValueError('%r is not callable' % (type_func,))
  ValueError: 'choice' is not callable

To Reproduce
Run tox!

Expected behavior

Should not fail in flake8

Version

  • I have tested with the latest published release and it's still a problem.
  • I have tested with the master branch and it's still a problem.

Additional context

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions