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.39k stars 306 forks source link

E704 is now conflicting with new black formatting rules #1925

Closed ezyang closed 5 months ago

ezyang commented 5 months ago

how did you install flake8?

poetry add flake8

unmodified output of flake8 --bug-report

{
  "platform": {
    "python_implementation": "CPython",
    "python_version": "3.8.11",
    "system": "Darwin"
  },
  "plugins": [
    {
      "plugin": "mccabe",
      "version": "0.7.0"
    },
    {
      "plugin": "pycodestyle",
      "version": "2.11.1"
    },
    {
      "plugin": "pyflakes",
      "version": "3.2.0"
    }
  ],
  "version": "7.0.0"
}

describe the problem

black as of 24.3.0 will format overload type stubs on one line, which I personally like

def hg(self, *args: str, **kwargs: Any) -> _SHELL_RET: ...

however, flake8 will complain about this via E704. I also like this rule, except for ellipses.

It would be good to relax E704 to allow for type stubs.

asottile commented 5 months ago

please read the issue template and the prompts before creating an issue

camilamacedo86 commented 5 months ago

Hi @asottile

I am facing the same issue. You close this one, but have we this issue tracked/solved already?

camilamacedo86 commented 5 months ago

Hi @asottile

I opened it as you requested here: https://github.com/PyCQA/flake8/issues/1926

sigmavirus24 commented 5 months ago

@camilamacedo86 Anthony was not asking you to create a new issue because this is not the correct place to create an issue. The issue prompts tell you that if you read them as does the flake8 documentation