pinax / pinax-stripe-light

a payments Django app for Stripe
MIT License
686 stars 285 forks source link

Latest version of isort breaks import order linting #632

Closed streeter closed 2 years ago

streeter commented 5 years ago

Issue Summary

isort version 4.3.5 has some breaking changes with regards to sorting imports: https://github.com/timothycrosley/isort/releases/tag/4.3.5

Steps to Reproduce

Run the flake8 linting tests without a version of isort that is pinned less than 4.3.5 and the tests will fail.

What were you expecting to happen?

The tests to pass

What actually happened?

checkqa installdeps: flake8 == 3.4.1, flake8-isort == 2.2.2, flake8-quotes == 0.11.0, Django < 2.2
checkqa develop-inst: /home/circleci/repo
checkqa installed: atomicwrites==1.3.0,attrs==19.1.0,certifi==2019.3.9,chardet==3.0.4,Django==2.1.8,django-appconf==1.0.3,django-ipware==2.1.0,flake8==3.4.1,flake8-isort==2.2.2,flake8-polyfill==1.0.2,flake8-quotes==0.11.0,idna==2.8,isort==4.3.17,jsonfield==2.0.2,mccabe==0.6.1,mock==2.0.0,more-itertools==7.0.0,pbr==5.1.3,-e git+git@github.com:pinax/pinax-stripe.git@d27a73f529708da73ccee3aa07c54b4a3dd3005a#egg=pinax_stripe,pluggy==0.9.0,py==1.8.0,pycodestyle==2.3.1,pyflakes==1.5.0,pytest==4.4.1,pytest-django==3.4.8,pytz==2019.1,requests==2.21.0,six==1.12.0,stripe==2.26.0,testfixtures==6.7.0,urllib3==1.24.2
checkqa run-test-pre: PYTHONHASHSEED='528838759'
checkqa run-test: commands[0] | flake8 pinax
pinax/stripe/__init__.py:2:1: I004 isort found an unexpected blank line in imports
pinax/stripe/tests/test_webhooks.py:13:1: I001 isort found an import in the wrong position
pinax/stripe/tests/test_webhooks.py:14:1: I001 isort found an import in the wrong position
pinax/stripe/tests/test_webhooks.py:15:1: I001 isort found an import in the wrong position
pinax/stripe/tests/test_webhooks.py:16:1: I001 isort found an import in the wrong position
pinax/stripe/tests/test_webhooks.py:17:1: I001 isort found an import in the wrong position
pinax/stripe/actions/customers.py:8:1: I001 isort found an import in the wrong position
pinax/stripe/actions/refunds.py:4:1: I001 isort found an import in the wrong position
pinax/stripe/actions/invoices.py:5:1: I001 isort found an import in the wrong position
ERROR: InvocationError for command /home/circleci/repo/.tox/checkqa/bin/flake8 pinax (exited with code 1)
blueyed commented 5 years ago

Might be worth adding --diff to the check (to see what is expected to be different). I guess that it is related to local packages?

paltman commented 2 years ago

Not seeing this after upgrading the CI