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

autopep8==2.0.1 not compliant with flake8==5.0.4 #664

Closed sebastien-genete closed 1 year ago

sebastien-genete commented 1 year ago

Python Code


pip install -r requirements-dev.txt

or 

./venv/bin/pip-compile requirements-dev.txt --output-file requirements-ci-dev.txt
./venv/bin/pip install --disable-pip-version-check -r requirements.txt -r requirements-ci-dev.txt 

Output

WARNING: using legacy resolver is deprecated and will be removed in future versions. The default resolver will be change to 'backtracking' in 7.0.0 version. Specify --resolver=backtracking to silence this warning.
Using legacy resolver. Consider using backtracking resolver with `--resolver=backtracking`.
Could not find a version that matches pycodestyle<2.10.0,>=2.10.0,>=2.9.0 (from -r requirements-dev.txt (line 26))
Tried: 2.0.0, 2.0.0, 2.1.0, 2.1.0, 2.2.0, 2.2.0, 2.3.0, 2.3.0, 2.3.1, 2.3.1, 2.4.0, 2.4.0, 2.5.0, 2.5.0, 2.6.0, 2.6.0, 2.7.0, 2.7.0, 2.8.0, 2.8.0, 2.9.0, 2.9.0, 2.9.1, 2.9.1, 2.10.0, 2.10.0
Skipped pre-versions: 1.8.0.dev0, 1.8.0.dev0, 2.0.0a1, 2.0.0a1, 2.6.0a1, 2.6.0a1
There are incompatible versions in the resolved dependencies:
  pycodestyle (from -r requirements-dev.txt (line 26))
  pycodestyle (from flake8-print==5.0.0->flake8-awesome==1.3.0->-r requirements-dev.txt (line 5))
  pycodestyle<2.10.0,>=2.9.0 (from flake8==5.0.4->-r requirements-dev.txt (line 4))
  pycodestyle>=2.10.0 (from autopep8==2.0.1->-r requirements-dev.txt (line 2))

Command Line and Configuration

.pep8, setup.cfg, ...

[requirements-dev.txt]
autodoc-pydantic
autopep8 #==2.0.0 # Temporary fix: 2.0.1 requires pycodestyle >=2.10 but flake8==5.0.4 requiert pycodestyle <2.10...
deprecated
flake8
flake8-awesome
flake8-blind-except
flake8-deprecated
flake8-docstrings
flake8-meiqia
flake8-mutable
flake8-pep3101
flake8-pie
flake8-quotes
flake8-rst-docstrings
flake8-string-format
ipdb
jupyter
jupyter_contrib_nbextensions
matplotlib
myst_parser
pandas-vet
pandera
pipreqs
pre-commit
psycopg2-binary
py
pycodestyle
pycodestyle_magic
pylint
pylint-venv
pytest
pytest-cov
pytest-flake8
pytest-lazy-fixture
pytest-sugar
python-decouple
pyvis
sphinx
sphinx_click
sphinx_rtd_theme
tuna
twine

Command Line

$ autopep8 

Your Environment

hhatto commented 1 year ago

If you use autopep8 version 2.0.0 and higher version, then flake8 must be version 6.0.0+. If you use flake8 version 5.0.4, then autopep8 must be less than version 2.0.0.