Skip to content

Commit

Permalink
chore: update pre commit configuration
Browse files Browse the repository at this point in the history
 - change from local install to the standard repo based config and
   remove the various pre-commit tools from requirements.dev
 - bump versions from most tools
 - add an exception for feat_params.json which will never comply
  • Loading branch information
joanise committed Dec 13, 2024
1 parent c6d0f64 commit d98ffdf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 41 deletions.
56 changes: 24 additions & 32 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,29 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-yaml
- id: check-json
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-json
exclude: feat_params.json
- id: end-of-file-fixer
- id: check-added-large-files
- id: trailing-whitespace
exclude: \.svg$
- repo: local
# Using local repos because these won't work for me from remote repo -EJ
# They're also more convenient because we install them via requirements.dev.txt
# and they are then available on the command line as well as in pre-commit.
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
name: isort
entry: isort
language: system
types: [python]
stages: [pre-commit]
- id: black
name: black
entry: black
language: system
types: [python]
stages: [pre-commit]
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
stages: [pre-commit]
- repo: https://github.com/pycqa/flake8
# do flake8 last to avoid duplicate reports
rev: 7.0.0
- id: isort
args: [--profile=black]
- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: flake8
- id: black
- repo: https://github.com/pycqa/flake8
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
- id: mypy
additional_dependencies: [pydantic, types-requests, types-python-slugify]
9 changes: 0 additions & 9 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# This is a set of development dependencies
black~=24.3
flake8>=4.0.1
gitlint-core>=0.17.0
httpx>=0.24.1
isort>=5.10.1
mypy>=1.4.1
mypy>=1.5.1; python_version >= "3.8"
pep440>=0.1.2
pre-commit>=2.6.0
types-python-slugify>=5.0.3
types-pyyaml>=6.0.5
types-requests>=2.31.0
types-setuptools>=57.4.9

0 comments on commit d98ffdf

Please sign in to comment.