Skip to content

Can't ignore DALL000 through config file on flake8 v6 #54

@FasterSpeeding

Description

@FasterSpeeding

Description

Trying to ignore DALL000 globally using a config file leads to a validation error when using flake8 v6.0.0

Steps to Reproduce

Run flake8 with the following .flake8 config file

[flake8]
ignore = DALL000

Actual result:

Traceback (most recent call last):
le_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Lucina\.pyenv\pyenv-win\versions\3.10.0\lib\runpy.py", line 86, in _run_code        
    exec(code, run_globals)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\Scripts\flake8.exe\__main__.py", line 7, in <module>
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\main\cli.py", line 23, in main
    app.run(argv)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\main\application.py", line 198, in run
    self._run(argv)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\main\application.py", line 186, in _run
    self.initialize(argv)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\main\application.py", line 165, in initialize
    self.plugins, self.options = parse_args(argv)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\options\parse_args.py", line 53, in parse_args
    opts = aggregator.aggregate_options(option_manager, cfg, cfg_dir, rest)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\options\aggregator.py", line 30, in aggregate_options
    parsed_config = config.parse_config(manager, cfg, cfg_dir)
  File "C:\Users\Lucina\Documents\vsc\Tanjun\venv\lib\site-packages\flake8\options\config.py", line 131, in parse_config
    raise ValueError(
ValueError: Error code 'DALL000' supplied to 'ignore' option does not match '^[A-Z]{1,3}[0-9]{0,3}$'

Expected result:

An error code which'll pass these checks is provided

Reproduces how often:

Every time this is used in the ignore section of a config file

Version

  • Operating System: Windows and Linux
  • Python: 3.9 and 3.10
  • flake8-dunder-all: 0.3.0
  • flake8: 6.0.0

Installation source

Pip

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstale

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions