From 67380d8b067ecfef936935ef16b8137273554e4a Mon Sep 17 00:00:00 2001 From: Matt Hammerly Date: Wed, 11 Oct 2023 06:00:22 -0700 Subject: [PATCH] add pre-commit config to cli + lint hook --- .pre-commit-config.yaml | 10 ++++++++++ tests/requirements.in | 1 + tests/requirements.txt | 27 ++++++++++++++++++++++----- 3 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..3dfd5783 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +repos: +- repo: local + hooks: + - id: lint + name: lint + description: "Lint and sort" + entry: make lint + pass_filenames: false + require_serial: true + language: system diff --git a/tests/requirements.in b/tests/requirements.in index 57ce4337..2c0cd0d6 100644 --- a/tests/requirements.in +++ b/tests/requirements.in @@ -1,3 +1,4 @@ +pre-commit pytest pytest-cov pytest-mock diff --git a/tests/requirements.txt b/tests/requirements.txt index a0dbd1ed..2e6d191e 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,19 +1,31 @@ # -# This file is autogenerated by pip-compile with Python 3.10 +# This file is autogenerated by pip-compile with Python 3.11 # by the following command: # # pip-compile tests/requirements.in # +cfgv==3.4.0 + # via pre-commit coverage[toml]==7.3.1 # via pytest-cov -exceptiongroup==1.1.3 - # via pytest +distlib==0.3.7 + # via virtualenv +filelock==3.12.4 + # via virtualenv +identify==2.5.30 + # via pre-commit iniconfig==2.0.0 # via pytest +nodeenv==1.8.0 + # via pre-commit packaging==23.2 # via pytest +platformdirs==3.11.0 + # via virtualenv pluggy==1.3.0 # via pytest +pre-commit==3.4.0 + # via -r tests/requirements.in pytest==7.4.2 # via # -r tests/requirements.in @@ -26,5 +38,10 @@ pytest-cov==4.1.0 # via -r tests/requirements.in pytest-mock==3.11.1 # via -r tests/requirements.in -tomli==2.0.1 - # via pytest +pyyaml==6.0.1 + # via pre-commit +virtualenv==20.24.5 + # via pre-commit + +# The following packages are considered to be unsafe in a requirements file: +# setuptools