Flake8 configuration file is not applied

What happened?

I’m trying to increase max line length by configuration file for flake8 checker. I’m using default values and create ~/.flake8rc based on the upstream documentation. For some reason this is not applied and I still see the max line length warning in the editor.

Based on the output of flycheck-verify-checker I see this output:

    - major mode:         `python-mode' supported
    - may enable:         yes
    - executable:         Found at /usr/bin/flake8
    - configuration file: Found at "/var/home/<snip>/.flake8rc"
    - next checkers:      python-pylint, python-mypy

The configuration file should be correct. Tested by flake8 --config locally. With the configuration file I don’t see the warning, without it I see the warning.

What did you expect to happen?

The max line length should be increased based on the value of the flake config file. The warnings I’m seeing in the doom emacs shouldn’t be visible.

Steps to reproduce

  1. Enable :tools lsp and :lang (python +lsp)
  2. Install lsp server for python based on your distribution
  3. Create a ~/.flake8rc file with content
Max-line-length = 99
  1. Create a python file with line longer than 80 characters and see warning E501 line too long... in the SPC c x output.


If you want you can use my container for distrobox for testing.

System information

Loading data dump...

Solved, it seems that LSP is not using what is showed by the flycheck-verify-checker based on the LSP documentation the configuration file should be placed to ~/.config/flake8.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.