You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a "historically grown" project we have a setup.cfg as well as a .flake8, which both have some configurations for flake8.
With version 4 of flake8 both file were taken into account.
But with the upgrade to version 5, flake8 seems to ignore the .flake8-file. I went trough the changelog and the list of (un-)resolved issues, but could not find any explanation. #199 inspired me to take a look into its implementation: flake8/src/flake8/options/config.py:
33forcandidatein ("setup.cfg", "tox.ini", ".flake8"):
34 ...
41# only consider it a config if it contains flake8 sections42if"flake8"incfgor"flake8:local-plugins"incfg:
43returncfg_path
Apparently, only the first configuration file in the list "setup.cfg", "tox.ini", ".flake8" is taken.
I don't know if this behaviour is desired or not and may be confirmed?
I think for my project I will take this issue as an occasion to merge the different configuration files.
sample code
MWE:
.
├── .flake8
├── setup.cfg
└── t.py
.flake8:
[flake8]max-line-length = 88
setup.cfg:
[flake8]extend-ignore = E203
t.py
print("Very, very, very, very, very, very, very, very, very, very, very long text")
commands ran
$ flake8 t.pyt.py:1:80: E501 line too long (83 > 79 characters)
The text was updated successfully, but these errors were encountered:
how did you install flake8?
pip install flake8
unmodified output of
flake8 --bug-report
describe the problem
what I expected to happen
In a "historically grown" project we have a
setup.cfg
as well as a.flake8
, which both have some configurations for flake8.With version 4 of flake8 both file were taken into account.
But with the upgrade to version 5, flake8 seems to ignore the
.flake8
-file. I went trough the changelog and the list of (un-)resolved issues, but could not find any explanation. #199 inspired me to take a look into its implementation:flake8/src/flake8/options/config.py
:Apparently, only the first configuration file in the list
"setup.cfg", "tox.ini", ".flake8"
is taken.I don't know if this behaviour is desired or not and may be confirmed?
I think for my project I will take this issue as an occasion to merge the different configuration files.
sample code
MWE:
.flake8
:setup.cfg
:t.py
commands ran
The text was updated successfully, but these errors were encountered: