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

'Namespace' object has no attribute 'extended_default_ignore' #10

Closed
frafra opened this issue Apr 16, 2021 · 6 comments
Closed

'Namespace' object has no attribute 'extended_default_ignore' #10

frafra opened this issue Apr 16, 2021 · 6 comments

Comments

@frafra
Copy link

frafra commented Apr 16, 2021

It looks like there is a problem while executing flake.

pdm run flake8helled viltkamera_manager.py 
Traceback (most recent call last):
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/bin/flake8helled", line 8, in <module>
    sys.exit(flake8_entrypoint())
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flakehell/_cli.py", line 51, in flake8_entrypoint
    exit_code, msg = main(['lint'] + argv)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flakehell/_cli.py", line 32, in main
    return COMMANDS[command_name](argv=argv[1:])
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flakehell/commands/_lint.py", line 12, in lint_command
    app.run(argv)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flake8/main/application.py", line 363, in run
    self._run(argv)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flake8/main/application.py", line 350, in _run
    self.initialize(argv)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flake8/main/application.py", line 337, in initialize
    self.make_guide()
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flakehell/_patched/_app.py", line 177, in make_guide
    self.guide = FlakeHellStyleGuideManager(self.options, self.formatter)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flakehell/_patched/_style_guide.py", line 17, in __init__
    super().__init__(options, formatter, decider)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flake8/style_guide.py", line 339, in __init__
    self.decider = decider or DecisionEngine(options)
  File "/home/frafra/Code/viltkamera-manager/__pypackages__/3.8/lib/flake8/style_guide.py", line 171, in __init__
    ).union(options.extended_default_ignore)
AttributeError: 'Namespace' object has no attribute 'extended_default_ignore'
@espdev
Copy link

espdev commented Apr 16, 2021

The same issue with flake8 == 3.9.1. With flake8 3.9.0 it works without the error.

@fliiiix
Copy link

fliiiix commented Apr 18, 2021

Looks like flakehell is using unsupported private interfaces see PyCQA/flake8#1318

@nobbynobbs
Copy link

nobbynobbs commented Apr 19, 2021

Faced into the same problem, spent some time and found the workaround. It fixes the exception and probably should break nothing.

# pyproject.toml

[tool.flakehell]
extended_default_ignore=[]  # add this

mario-bermonti added a commit to mario-bermonti/stimpool that referenced this issue Apr 19, 2021
Flakehell not working on GitHub. Followed this  recommendation
flakehell/flakehell#10
@mario-bermonti
Copy link

I tried @nobbynobbs suggestion but it didn’t fix the problem for me. 😕

@nobbynobbs
Copy link

@mario-bermonti could you explain please? I've cloned your stimpool project, install it with poetry, then update flake to 3.9.1 (in poetry.lock pinned 3.9.0) and run flakehell. And looks like it works.

@mario-bermonti
Copy link

@nobbynobbs I made a mistake. It's working fine. I must have gotten confused with the original time the Github action ran and it failed.

Thanks!

lyz-code added a commit to lyz-code/cookiecutter-python-project that referenced this issue Apr 23, 2021
Until flakehell/flakehell#10 is fixed

perf: Change the overview name for the package name, so it's better seen
dadyarri added a commit to uni-jacob/jacob that referenced this issue Apr 29, 2021
mario-bermonti added a commit to mario-bermonti/cookiecutter-modern-pypackage that referenced this issue May 31, 2021
Flakehell not working on GitHub. Followed this  recommendation
flakehell/flakehell#10

This was cherry picked from `stimpool`.
brutus added a commit to brutus/wtforms-html5 that referenced this issue Jun 4, 2021
0x2b3bfa0 added a commit to 0x2b3bfa0/python-blobopera that referenced this issue Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants