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
I'm an existing user of pycodestyle and I'm trying to adopt autopep8 in a new project. I want to be able to use autopep8 "cleanly" on its own, independently of pycodestyle config, because otherwise I'd have to manage and consider the interactions between config files of autopep8 and pycodestyle.
autopep8 behavior depends on the behavior of the internal pycodestyle invocation, which will load global pycodestyle config. Thus, config in pyproject.toml does not take full precedence, leading to confusing behavior.
Did some cursory reading, seems like adding the right options to pep8_options can instruct pycodestyle not to read its own configuration and only use what's passed in.
One way out of this is to stop using a ~/.config/pycodestyle, which I use as my "user Python linting settings" outside of any particular project. However, I think these issues should be addressed somehow b/c this is likely a fairly common use case.
I'm an existing user of
pycodestyle
and I'm trying to adoptautopep8
in a new project. I want to be able to useautopep8
"cleanly" on its own, independently ofpycodestyle
config, because otherwise I'd have to manage and consider the interactions between config files ofautopep8
andpycodestyle
.Although the
README.md
says:It turns out that's not really the case when
~/.config/pycodestyle
exists. There are two related sub-issues, in this regard.internal
pycodestyle
invocation loads external configautopep8
behavior depends on the behavior of the internalpycodestyle
invocation, which will load globalpycodestyle
config. Thus, config inpyproject.toml
does not take full precedence, leading to confusing behavior.Did some cursory reading, seems like adding the right options to
pep8_options
can instructpycodestyle
not to read its own configuration and only use what's passed in.Cannot disable
global-config
viapyproject.toml
CLI invocation works:
autopep8 --global-config ""
But in
pyproject.toml
the setting is useless:Because
read_config()
will loadpycodestyle
config beforeread_pyproject_toml()
runs, thus config inpyproject.toml
does not take precedence.Use Case
One way out of this is to stop using a
~/.config/pycodestyle
, which I use as my "user Python linting settings" outside of any particular project. However, I think these issues should be addressed somehow b/c this is likely a fairly common use case.Your Environment
The text was updated successfully, but these errors were encountered: