From 1654dd3ce39376f915f1249d753183de82d2a991 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Gmach?= Date: Wed, 30 Sep 2020 18:48:35 +0200 Subject: [PATCH] Update pre-commit ... and sort envs in `tox.ini`. modified: .pre-commit-config.yaml modified: setup.py modified: tox.ini --- .pre-commit-config.yaml | 32 +++++++++++++++++++------------- setup.py | 14 ++++++++++++-- tox.ini | 10 +++++----- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dc4582e..621c2fb 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,27 +1,33 @@ repos: - - repo: https://github.com/asottile/seed-isort-config - rev: v2.1.1 + - repo: https://github.com/mgedmin/check-manifest + rev: "0.39" hooks: - - id: seed-isort-config + - id: check-manifest - - repo: https://github.com/pre-commit/mirrors-isort - rev: v4.3.21 # pick the isort version you'd like to use from https://github.com/pre-commit/mirrors-isort/releases +repos: + - repo: https://github.com/mgedmin/check-python-versions + rev: "0.15" hooks: - - id: isort + - id: check-python-versions - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.1.0 # Use the ref you want to point at + rev: v3.2.0 hooks: - id: debug-statements + - repo: https://github.com/psf/black + rev: 20.8b1 + hooks: + - id: black + language_version: python3.6 + - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.2 # pick a git hash / tag to point to + rev: 3.8.3 hooks: - id: flake8 - additional_dependencies: [flake8-click, flake8-bugbear] + additional_dependencies: [flake8-click==0.3.1, flake8-bugbear==20.1.4] - - repo: https://github.com/psf/black - rev: 19.10b0 + - repo: https://github.com/PyCQA/isort.git + rev: 5.5.4 hooks: - - id: black - language_version: python3.6 + - id: isort diff --git a/setup.py b/setup.py index cf8d08f..a247b6b 100644 --- a/setup.py +++ b/setup.py @@ -41,9 +41,19 @@ def read(*parts): license="MIT", packages=find_packages(where="src"), package_dir={"": "src"}, - extras_require={"test": ["pytest >=5.2.2", "pytest-cov",], "dev": ["pdbpp"]}, + extras_require={ + "test": [ + "pytest >=5.2.2", + "pytest-cov", + ], + "dev": ["pdbpp"], + }, include_package_data=True, zip_safe=True, - install_requires=["click>=7.1.2", "pykeepass>=3.2.0", "httpx>=0.13.3",], + install_requires=[ + "click>=7.1.2", + "pykeepass>=3.2.0", + "httpx>=0.13.3", + ], entry_points={"console_scripts": ["hibpcli = hibpcli.cli:main"]}, ) diff --git a/tox.ini b/tox.ini index 1588b77..f1faea9 100644 --- a/tox.ini +++ b/tox.ini @@ -14,6 +14,11 @@ commands = pip install -e . pytest {posargs} +[testenv:pre-commit] +skip_install = true +deps = pre-commit +commands = pre-commit run --all-files --show-diff-on-failure + [testenv:coverage] develop = true @@ -26,10 +31,5 @@ commands = max-line-length = 88 ignore = E231 # clashes with black -[testenv:pre-commit] -skip_install = true -deps = pre-commit -commands = pre-commit run --all-files --show-diff-on-failure - [isort] known_third_party = click,hibpcli,httpx,pykeepass,pytest,setuptools