PyCQA / flake8

flake8 is a python tool that glues together pycodestyle, pyflakes, mccabe, and third-party plugins to check the style and quality of some python code.
https://flake8.pycqa.org
Other
3.43k stars 307 forks source link

flake8 consumes a lot of RAM and 100% CPU usage #1936

Closed vyunolbek closed 5 months ago

vyunolbek commented 5 months ago

how did you install flake8?

$ pip install flake8

unmodified output of flake8 --bug-report

{
  "platform": {
    "python_implementation": "CPython",
    "python_version": "3.12.3",
    "system": "Linux"
  },
  "plugins": [
    {
      "plugin": "mccabe",
      "version": "0.7.0"
    },
    {
      "plugin": "pycodestyle",
      "version": "2.9.1"
    },
    {
      "plugin": "pyflakes",
      "version": "2.5.0"
    }
  ],
  "version": "5.0.0"
}

describe the problem

what I expected to happen

flake8 succeeds with no issues ...

sample code

A typical project with multiple folders

commands ran

$ flake8 --config=dir/.config/lint.cfg dir
...

I can't attach what the console outputs, because the computer just shuts down due to lack of RAM. Previously, it returned the RecursionError error: maximum recursion depth exceeded. Now he just goes on the defensive

sigmavirus24 commented 5 months ago

There's not enough information to reproduce this and I haven't ever seen it behave like this, even on larger projects like openstack