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

E704 is now conflicting with new black formatting rules #1925

Closed
ezyang opened this issue Mar 21, 2024 · 4 comments
Closed

E704 is now conflicting with new black formatting rules #1925

ezyang opened this issue Mar 21, 2024 · 4 comments

Comments

@ezyang
Copy link

ezyang commented Mar 21, 2024

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
Copy link
Member

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

@camilamacedo86
Copy link

Hi @asottile

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

@camilamacedo86
Copy link

Hi @asottile

I opened it as you requested here: #1926

@sigmavirus24
Copy link
Member

@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

@PyCQA PyCQA locked and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants