diff --git a/requirements.txt b/requirements.txt index 4eb19f8a..310a46d3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ binaryornot==0.4.4 black==19.10b0 isort==4.3.21 flake8==3.8.3 -flake8-isort==3.0.1 +flake8-isort==4.0.0 # Testing # ------------------------------------------------------------------------------ diff --git a/tests/test_bare.sh b/tests/test_bare.sh index 7021a7e4..28f9b7bf 100755 --- a/tests/test_bare.sh +++ b/tests/test_bare.sh @@ -5,6 +5,10 @@ set -o errexit +# Install modern pip to use new resolver: +# https://blog.python.org/2020/07/upgrade-pip-20-2-changes-20-3.html +pip install 'pip>=20.2' + # install test requirements pip install -r requirements.txt @@ -20,7 +24,7 @@ cd my_awesome_project sudo utility/install_os_dependencies.sh install # Install Python deps -pip install -r requirements/local.txt +pip install --use-feature=2020-resolver -r requirements/local.txt # run the project's tests pytest diff --git a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml index 6aa9207a..734a0a71 100644 --- a/{{cookiecutter.project_slug}}/.pre-commit-config.yaml +++ b/{{cookiecutter.project_slug}}/.pre-commit-config.yaml @@ -15,6 +15,11 @@ repos: hooks: - id: black + - repo: https://github.com/timothycrosley/isort + rev: 4.3.21 + hooks: + - id: isort + - repo: https://gitlab.com/pycqa/flake8 rev: 3.8.3 hooks: diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index 028b36a9..78913593 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -13,7 +13,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod # Testing # ------------------------------------------------------------------------------ -mypy==0.782 # https://github.com/python/mypy +mypy==0.770 # https://github.com/python/mypy django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs pytest==6.0.1 # https://github.com/pytest-dev/pytest pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar @@ -26,7 +26,7 @@ sphinx-autobuild==0.7.1 # https://github.com/GaretJax/sphinx-autobuild # Code quality # ------------------------------------------------------------------------------ flake8==3.8.3 # https://github.com/PyCQA/flake8 -flake8-isort==3.0.1 # https://github.com/gforcada/flake8-isort +flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort coverage==5.2.1 # https://github.com/nedbat/coveragepy black==19.10b0 # https://github.com/ambv/black pylint-django==2.3.0 # https://github.com/PyCQA/pylint-django