Skip to content

Line length in flake8/pycodestyle #186

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

Closed
bagel897 opened this issue Mar 30, 2022 · 1 comment
Closed

Line length in flake8/pycodestyle #186

bagel897 opened this issue Mar 30, 2022 · 1 comment

Comments

@bagel897
Copy link
Contributor

Follow up from pull
I want to use the black plugin with pylsp which specifies a line length of 88. However, flake8 and pycodestyle take issue with this.
I want to disable this from my editor settings (using neovim's built in LSP), not using a separate configuration file.

For line length, there seems to be 3 warnings:

  1. the pyls-flake8 plugin, which does not recognize the MaxLineLength option but does disable the pycodestyle plugin
    image
  2. the pycodestyle plugin, which I haven't tried to configure
  3. the flake8 plugin which is disabled by default, but when enabled, does not recognize the option and produces a duplicate message
    image
    Which is the recommended approach, and what configuration key should I use?
@bagel897
Copy link
Contributor Author

I was able to fix this by

  1. Not using pyls-flake8
  2. Using the following configuration
plugins = {
		pycodestyle = { enabled = true, maxLineLength = 88 },
		flake8 = { enabled = true, ignore = "E501" },
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant