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

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

Open
FasterSpeeding opened this issue Jun 16, 2023 · 1 comment · May be fixed by #58
Open

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

FasterSpeeding opened this issue Jun 16, 2023 · 1 comment · May be fixed by #58
Assignees
Labels
bug Something isn't working stale

Comments

@FasterSpeeding
Copy link

FasterSpeeding commented Jun 16, 2023

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

@FasterSpeeding FasterSpeeding added the bug Something isn't working label Jun 16, 2023
@stale stale bot added the stale label Dec 14, 2023
@AlbertUnruh AlbertUnruh linked a pull request Dec 28, 2023 that will close this issue
@AlbertUnruh
Copy link

opened a pr to fix your the issue

while it's not merged you can specify flake-dunder-all as git+https://github.com/AlbertUnruh/flake8-dunder-all.git@master*

*you need to update your codes from DALLXXX to DALXXX

@stale stale bot removed the stale label Dec 28, 2023
@stale stale bot added the stale label Jun 26, 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 stale
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants