From 9429851d02240baf34d937924f99cd6703675c7f Mon Sep 17 00:00:00 2001 From: James Cooke Date: Thu, 11 Mar 2021 17:47:28 +0000 Subject: [PATCH] Fix Makefile, bump packages (#174) * Fix Makefile: old 'tox' recipe is now 'test' * Update version string in README * Bump all requirements * Show mypy error codes * Don't check black files with mypy: leads to duplicate warnings --- Makefile | 6 +- README.rst | 4 +- requirements/base.txt | 26 +++-- requirements/dev.txt | 124 ++++++++++++++++----- requirements/examples-py36.txt | 87 ++++++++++----- requirements/examples.txt | 80 ++++++++++---- requirements/test.txt | 194 ++++++++++++++++++++++++--------- setup.cfg | 3 + 8 files changed, 383 insertions(+), 141 deletions(-) diff --git a/Makefile b/Makefile index 2d77a0b..04821a1 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ lintexamples: flake8 examples/good examples/bad | sort > flake8.out diff examples/bad/flake8_expected.out flake8.out @echo "=== mypy ===" - mypy examples examples/good --ignore-missing-imports + mypy examples/conftest.py examples/good --ignore-missing-imports --exclude examples/good/black/ mypy examples/bad --ignore-missing-imports @echo "=== black ===" black --check --diff --verbose examples/good/black @@ -96,11 +96,11 @@ clean: find . -name '*.pyc' -delete .PHONY: sdist -sdist: tox +sdist: test python setup.py sdist .PHONY: bdist_wheel -bdist_wheel: tox +bdist_wheel: test python setup.py bdist_wheel .PHONY: testpypi diff --git a/README.rst b/README.rst index 34e908d..1d467ce 100644 --- a/README.rst +++ b/README.rst @@ -156,9 +156,9 @@ string: .. code-block:: shell $ flake8 --version - 3.8.3 (aaa: 0.11.0, mccabe: 0.6.1, pycodestyle: 2.6.0, pyflakes: 2.2.0) ... + 3.8.4 (aaa: 0.11.1, mccabe: 0.6.1, pycodestyle: 2.6.0, pyflakes: 2.2.0) ... -The ``aaa: 0.11.0`` part tells you that Flake8-AAA was installed successfully +The ``aaa: 0.11.1`` part tells you that Flake8-AAA was installed successfully and its checks will be used by Flake8. Further reading: diff --git a/requirements/base.txt b/requirements/base.txt index 6024caf..e2381fb 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -4,11 +4,21 @@ # # pip-compile --output-file=base.txt base.in # -asttokens==2.0.4 # via -r base.in -flake8==3.8.4 # via -r base.in -importlib-metadata==2.0.0 # via flake8 -mccabe==0.6.1 # via flake8 -pycodestyle==2.6.0 # via flake8 -pyflakes==2.2.0 # via flake8 -six==1.15.0 # via asttokens -zipp==3.4.0 # via importlib-metadata +asttokens==2.0.4 + # via -r base.in +flake8==3.8.4 + # via -r base.in +importlib-metadata==3.7.2 + # via flake8 +mccabe==0.6.1 + # via flake8 +pycodestyle==2.6.0 + # via flake8 +pyflakes==2.2.0 + # via flake8 +six==1.15.0 + # via asttokens +typing-extensions==3.7.4.3 + # via importlib-metadata +zipp==3.4.1 + # via importlib-metadata diff --git a/requirements/dev.txt b/requirements/dev.txt index c9425fb..bfd3b96 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,35 +4,101 @@ # # pip-compile --output-file=dev.txt dev.in # -bleach==3.2.1 # via readme-renderer -certifi==2020.11.8 # via -c test.txt, requests -cffi==1.14.3 # via cryptography -chardet==3.0.4 # via -c test.txt, requests -click==7.1.2 # via pip-tools -colorama==0.4.4 # via twine -cryptography==3.2.1 # via secretstorage -docutils==0.16 # via -c test.txt, readme-renderer -idna==2.10 # via -c test.txt, requests -importlib-metadata==2.0.0 # via -c base.txt, -c test.txt, keyring, twine -jeepney==0.5.0 # via keyring, secretstorage -keyring==21.5.0 # via twine -packaging==20.4 # via -c test.txt, bleach -pip-tools==5.3.1 # via -r dev.in -pkginfo==1.6.1 # via twine -pycparser==2.20 # via cffi -pygments==2.7.2 # via -c test.txt, readme-renderer -pyparsing==2.4.7 # via -c test.txt, packaging -readme-renderer==28.0 # via twine -requests-toolbelt==0.9.1 # via twine -requests==2.25.0 # via -c test.txt, requests-toolbelt, twine -rfc3986==1.4.0 # via twine -secretstorage==3.2.0 # via keyring -six==1.15.0 # via -c base.txt, -c test.txt, bleach, cryptography, packaging, pip-tools, readme-renderer -tqdm==4.51.0 # via twine -twine==3.2.0 # via -r dev.in -urllib3==1.26.2 # via -c test.txt, requests -webencodings==0.5.1 # via bleach -zipp==3.4.0 # via -c base.txt, -c test.txt, importlib-metadata +bleach==3.3.0 + # via readme-renderer +certifi==2020.12.5 + # via + # -c test.txt + # requests +cffi==1.14.5 + # via cryptography +chardet==4.0.0 + # via + # -c test.txt + # requests +click==7.1.2 + # via pip-tools +colorama==0.4.4 + # via twine +cryptography==3.4.6 + # via secretstorage +docutils==0.16 + # via + # -c test.txt + # readme-renderer +idna==2.10 + # via + # -c test.txt + # requests +importlib-metadata==3.7.2 + # via + # -c base.txt + # -c test.txt + # keyring + # twine +jeepney==0.6.0 + # via + # keyring + # secretstorage +keyring==23.0.0 + # via twine +packaging==20.9 + # via + # -c test.txt + # bleach +pip-tools==5.5.0 + # via -r dev.in +pkginfo==1.7.0 + # via twine +pycparser==2.20 + # via cffi +pygments==2.8.1 + # via + # -c test.txt + # readme-renderer +pyparsing==2.4.7 + # via + # -c test.txt + # packaging +readme-renderer==29.0 + # via twine +requests-toolbelt==0.9.1 + # via twine +requests==2.25.1 + # via + # -c test.txt + # requests-toolbelt + # twine +rfc3986==1.4.0 + # via twine +secretstorage==3.3.1 + # via keyring +six==1.15.0 + # via + # -c base.txt + # -c test.txt + # bleach + # readme-renderer +tqdm==4.59.0 + # via twine +twine==3.3.0 + # via -r dev.in +typing-extensions==3.7.4.3 + # via + # -c base.txt + # -c test.txt + # importlib-metadata +urllib3==1.26.3 + # via + # -c test.txt + # requests +webencodings==0.5.1 + # via bleach +zipp==3.4.1 + # via + # -c base.txt + # -c test.txt + # importlib-metadata # The following packages are considered to be unsafe in a requirements file: # pip diff --git a/requirements/examples-py36.txt b/requirements/examples-py36.txt index e112414..aa9c01b 100644 --- a/requirements/examples-py36.txt +++ b/requirements/examples-py36.txt @@ -2,30 +2,65 @@ # This file is autogenerated by pip-compile # To update, run: # -# pip-compile --output-file=examples.txt examples.in +# pip-compile --output-file=examples-py36.txt examples.in # -appdirs==1.4.4 # via black -attrs==20.3.0 # via pytest -black==20.8b1 # via -r examples.in -click==7.1.2 # via black -dataclasses==0.8 # via black -flake8==3.8.4 # via -r examples.in -importlib-metadata==2.0.0 # via flake8, pluggy, pytest -iniconfig==1.1.1 # via pytest -mccabe==0.6.1 # via flake8 -mypy-extensions==0.4.3 # via black, mypy -mypy==0.790 # via -r examples.in -packaging==20.4 # via pytest -pathspec==0.8.1 # via black -pluggy==0.13.1 # via pytest -py==1.9.0 # via pytest -pycodestyle==2.6.0 # via flake8 -pyflakes==2.2.0 # via flake8 -pyparsing==2.4.7 # via packaging -pytest==6.1.2 # via -r examples.in -regex==2020.11.13 # via black -six==1.15.0 # via packaging -toml==0.10.2 # via black, pytest -typed-ast==1.4.1 # via black, mypy -typing-extensions==3.7.4.3 # via black, mypy -zipp==3.4.0 # via importlib-metadata +appdirs==1.4.4 + # via black +attrs==20.3.0 + # via pytest +black==20.8b1 + # via -r examples.in +click==7.1.2 + # via black +dataclasses==0.8 + # via black +flake8==3.8.4 + # via -r examples.in +importlib-metadata==3.7.2 + # via + # flake8 + # pluggy + # pytest +iniconfig==1.1.1 + # via pytest +mccabe==0.6.1 + # via flake8 +mypy-extensions==0.4.3 + # via + # black + # mypy +mypy==0.812 + # via -r examples.in +packaging==20.9 + # via pytest +pathspec==0.8.1 + # via black +pluggy==0.13.1 + # via pytest +py==1.10.0 + # via pytest +pycodestyle==2.6.0 + # via flake8 +pyflakes==2.2.0 + # via flake8 +pyparsing==2.4.7 + # via packaging +pytest==6.2.2 + # via -r examples.in +regex==2020.11.13 + # via black +toml==0.10.2 + # via + # black + # pytest +typed-ast==1.4.2 + # via + # black + # mypy +typing-extensions==3.7.4.3 + # via + # black + # importlib-metadata + # mypy +zipp==3.4.1 + # via importlib-metadata diff --git a/requirements/examples.txt b/requirements/examples.txt index 81b6bee..d2bb6df 100644 --- a/requirements/examples.txt +++ b/requirements/examples.txt @@ -4,25 +4,61 @@ # # pip-compile --output-file=examples.txt examples.in # -appdirs==1.4.4 # via black -attrs==20.3.0 # via pytest -black==20.8b1 # via -r examples.in -click==7.1.2 # via black -flake8==3.8.4 # via -r examples.in -iniconfig==1.1.1 # via pytest -mccabe==0.6.1 # via flake8 -mypy-extensions==0.4.3 # via black, mypy -mypy==0.790 # via -r examples.in -packaging==20.4 # via pytest -pathspec==0.8.1 # via black -pluggy==0.13.1 # via pytest -py==1.9.0 # via pytest -pycodestyle==2.6.0 # via flake8 -pyflakes==2.2.0 # via flake8 -pyparsing==2.4.7 # via packaging -pytest==6.1.2 # via -r examples.in -regex==2020.11.13 # via black -six==1.15.0 # via packaging -toml==0.10.2 # via black, pytest -typed-ast==1.4.1 # via black, mypy -typing-extensions==3.7.4.3 # via black, mypy +appdirs==1.4.4 + # via black +attrs==20.3.0 + # via pytest +black==20.8b1 + # via -r examples.in +click==7.1.2 + # via black +flake8==3.8.4 + # via -r examples.in +importlib-metadata==3.7.2 + # via + # flake8 + # pluggy + # pytest +iniconfig==1.1.1 + # via pytest +mccabe==0.6.1 + # via flake8 +mypy-extensions==0.4.3 + # via + # black + # mypy +mypy==0.812 + # via -r examples.in +packaging==20.9 + # via pytest +pathspec==0.8.1 + # via black +pluggy==0.13.1 + # via pytest +py==1.10.0 + # via pytest +pycodestyle==2.6.0 + # via flake8 +pyflakes==2.2.0 + # via flake8 +pyparsing==2.4.7 + # via packaging +pytest==6.2.2 + # via -r examples.in +regex==2020.11.13 + # via black +toml==0.10.2 + # via + # black + # pytest +typed-ast==1.4.2 + # via + # black + # mypy +typing-extensions==3.7.4.3 + # via + # black + # importlib-metadata + # mypy +zipp==3.4.1 + # via importlib-metadata diff --git a/requirements/test.txt b/requirements/test.txt index bb7e2c7..7de3c40 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -4,57 +4,149 @@ # # pip-compile --output-file=test.txt test.in # -alabaster==0.7.12 # via sphinx -appdirs==1.4.4 # via virtualenv -attrs==20.3.0 # via pytest -babel==2.9.0 # via sphinx -certifi==2020.11.8 # via requests -chardet==3.0.4 # via requests -distlib==0.3.1 # via virtualenv -docutils==0.16 # via restructuredtext-lint, sphinx -filelock==3.0.12 # via tox, virtualenv -flake8==3.8.4 # via -c base.txt, -r test.in -idna==2.10 # via requests -imagesize==1.2.0 # via sphinx -importlib-metadata==2.0.0 # via -c base.txt, flake8, pluggy, pytest, tox, virtualenv -importlib-resources==3.3.0 # via virtualenv -iniconfig==1.1.1 # via pytest -isort==5.6.4 # via -r test.in -jinja2==2.11.2 # via sphinx -markupsafe==1.1.1 # via jinja2 -mccabe==0.6.1 # via -c base.txt, flake8 -more-itertools==8.6.0 # via pytest -mypy-extensions==0.4.3 # via mypy -mypy==0.790 # via -r test.in -packaging==20.4 # via pytest, sphinx, tox -pluggy==0.13.1 # via pytest, tox -py==1.9.0 # via pytest, tox -pycodestyle==2.6.0 # via -c base.txt, flake8 -pyflakes==2.2.0 # via -c base.txt, flake8 -pygments==2.7.2 # via -r test.in, sphinx -pyparsing==2.4.7 # via packaging -pytest==6.0.0rc1 # via -r test.in -pytz==2020.4 # via babel -requests==2.25.0 # via sphinx -restructuredtext-lint==1.3.1 # via -r test.in -six==1.15.0 # via -c base.txt, -r test.in, packaging, tox, virtualenv -snowballstemmer==2.0.0 # via sphinx -sphinx-rtd-theme==0.5.0 # via -r test.in -sphinx==3.3.1 # via -r test.in, sphinx-rtd-theme -sphinxcontrib-applehelp==1.0.2 # via sphinx -sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==1.0.3 # via sphinx -sphinxcontrib-jsmath==1.0.1 # via sphinx -sphinxcontrib-qthelp==1.0.3 # via sphinx -sphinxcontrib-serializinghtml==1.1.4 # via sphinx -toml==0.10.2 # via pytest, tox -tox==3.20.1 # via -r test.in -typed-ast==1.4.1 # via mypy -typing-extensions==3.7.4.3 # via mypy -urllib3==1.26.2 # via requests -virtualenv==20.1.0 # via tox -yapf==0.30.0 # via -r test.in -zipp==3.4.0 # via -c base.txt, importlib-metadata, importlib-resources +alabaster==0.7.12 + # via sphinx +appdirs==1.4.4 + # via virtualenv +attrs==20.3.0 + # via pytest +babel==2.9.0 + # via sphinx +certifi==2020.12.5 + # via requests +chardet==4.0.0 + # via requests +distlib==0.3.1 + # via virtualenv +docutils==0.16 + # via + # restructuredtext-lint + # sphinx +filelock==3.0.12 + # via + # tox + # virtualenv +flake8==3.8.4 + # via + # -c base.txt + # -r test.in +idna==2.10 + # via requests +imagesize==1.2.0 + # via sphinx +importlib-metadata==3.7.2 + # via + # -c base.txt + # flake8 + # pluggy + # pytest + # tox + # virtualenv +importlib-resources==5.1.2 + # via virtualenv +iniconfig==1.1.1 + # via pytest +isort==5.7.0 + # via -r test.in +jinja2==2.11.3 + # via sphinx +markupsafe==1.1.1 + # via jinja2 +mccabe==0.6.1 + # via + # -c base.txt + # flake8 +more-itertools==8.7.0 + # via pytest +mypy-extensions==0.4.3 + # via mypy +mypy==0.812 + # via -r test.in +packaging==20.9 + # via + # pytest + # sphinx + # tox +pluggy==0.13.1 + # via + # pytest + # tox +py==1.10.0 + # via + # pytest + # tox +pycodestyle==2.6.0 + # via + # -c base.txt + # flake8 +pyflakes==2.2.0 + # via + # -c base.txt + # flake8 +pygments==2.8.1 + # via + # -r test.in + # sphinx +pyparsing==2.4.7 + # via packaging +pytest==6.0.0rc1 + # via -r test.in +pytz==2021.1 + # via babel +requests==2.25.1 + # via sphinx +restructuredtext-lint==1.3.2 + # via -r test.in +six==1.15.0 + # via + # -c base.txt + # -r test.in + # tox + # virtualenv +snowballstemmer==2.1.0 + # via sphinx +sphinx-rtd-theme==0.5.1 + # via -r test.in +sphinx==3.5.2 + # via + # -r test.in + # sphinx-rtd-theme +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==1.0.3 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==1.0.3 + # via sphinx +sphinxcontrib-serializinghtml==1.1.4 + # via sphinx +toml==0.10.2 + # via + # pytest + # tox +tox==3.23.0 + # via -r test.in +typed-ast==1.4.2 + # via mypy +typing-extensions==3.7.4.3 + # via + # -c base.txt + # importlib-metadata + # mypy +urllib3==1.26.3 + # via requests +virtualenv==20.4.2 + # via tox +yapf==0.30.0 + # via -r test.in +zipp==3.4.1 + # via + # -c base.txt + # importlib-metadata + # importlib-resources # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/setup.cfg b/setup.cfg index 1f3cbcd..5788268 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,3 +15,6 @@ column_limit = 120 [tool:pytest] addopts=--tb=short --color=yes + +[mypy] +show_error_codes=True