PyCQA / pycodestyle

Simple Python style checker in one Python file
https://pycodestyle.pycqa.org
Other
5.02k stars 756 forks source link

Undocumented breaking change affecting autopep8 #1191

Closed paugier closed 1 year ago

paugier commented 1 year ago

I guess pycodestyle.missing_whitespace_around_operator was removed in pycodestyle 2.11.0 (2023-07-29).

It breaks autopep8 (https://github.com/hhatto/autopep8/issues/689). Currently, the most recent versions of pycodestyle and autopep8 are incompatible.

How this should be fixed? Which project (pycodestyle or autopep8) has to be adapted and how?

paugier commented 1 year ago

The commit which suppressed missing_whitespace_around_operator: https://github.com/PyCQA/pycodestyle/commit/f04e2a1f5d37f8668519f123b97bf38165994b72

sigmavirus24 commented 1 year ago

Autopep8 needs to adjust

paugier commented 1 year ago

Should it be enough to just call missing_whitespace instead of missing_whitespace_around_operator in autopep8?

Shouldn't such breaking change be mentioned in https://pycodestyle.pycqa.org/en/latest/developer.html#changes?

asottile commented 1 year ago

there is no public API of pycodestyle beyond the StyleGuide. calling the internal functions is at your own risk