hhatto / autopep8

A tool that automatically formats Python code to conform to the PEP 8 style guide.
https://pypi.org/project/autopep8/
MIT License
4.54k stars 291 forks source link

Pyproject.toml is ignored if ~/.config/pycodestyle have select key filled #707

Open actionless opened 10 months ago

actionless commented 10 months ago

Command Line

$ cat ~/.config/pycodestyle
[pycodestyle]
select = E1
max-line-length = 160

$ autopep8 --ignore="" --verbose --in-place ./oomox_gui/colors_list.py
read config path: /home/lie/.config/pycodestyle
read config path: /home/lie/projects/oomox/.flake8
enable config: section=pycodestyle, key=select, value=E1
enable config: section=pycodestyle, key=max-line-length, value=160
enable config: section=flake8, key=max-line-length, value=120
enable config: section=flake8, key=ignore, value=F811,W503,W504
[file:./oomox_gui/colors_list.py]
--->  0 issue(s) to fix {}

$ vim ~/.config/pycodestyle

$ cat ~/.config/pycodestyle
[pycodestyle]
#select = E1
max-line-length = 160

$ autopep8 --ignore="" --verbose --in-place ./oomox_gui/colors_list.py
read config path: /home/lie/.config/pycodestyle
read config path: /home/lie/projects/oomox/.flake8
enable config: section=pycodestyle, key=max-line-length, value=160
enable config: section=flake8, key=max-line-length, value=120
enable config: section=flake8, key=ignore, value=F811,W503,W504
enable pyproject.toml config: key=max_line_length, value=120
enable pyproject.toml config: key=select, value=*
enable pyproject.toml config: key=ignore, value=
[file:./oomox_gui/colors_list.py]
--->  0 issue(s) to fix {}

Your Environment