Skip to content

Commit

Permalink
Upgrade precommit librairies and add to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ponceta authored Sep 25, 2024
1 parent 7b4424c commit eb353b4
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ exclude: '^.*\.xtf|.*\.xml|.*\.ili|qgepqwat2ili/bin.*$'
repos:
# Fix end of files
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -14,7 +14,7 @@ repos:

# Remove unused imports/variables
- repo: https://github.com/myint/autoflake
rev: v2.0.1
rev: v2.3.1
hooks:
- id: autoflake
args:
Expand All @@ -24,7 +24,7 @@ repos:

# Sort imports
- repo: https://github.com/pycqa/isort
rev: "5.12.0"
rev: "5.13.2"
hooks:
- id: isort
args:
Expand All @@ -33,6 +33,38 @@ repos:

# Black formatting
- repo: https://github.com/psf/black
rev: 22.12.0
rev: "24.4.2"
hooks:
- id: black
args: ["--line-length=99"]

# tool to automatically upgrade syntax for newer versions of the language
- repo: https://github.com/asottile/pyupgrade
rev: v3.16.0
hooks:
- id: pyupgrade
args: [--py37-plus]

# Lint files
- repo: https://github.com/pycqa/flake8
rev: "7.1.0"
hooks:
- id: flake8
args: [
"--max-line-length=115",
# ignore long comments (E501), as long lines are formatted by black
"--ignore=E501,E203,W503",
]

# # Static type-checking with mypy
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 'v1.5.1'
# hooks:
# - id: mypy
# additional_dependencies: [types-pytz, types-Deprecated, types-PyYAML, types-requests, types-tabulate, types-jsonschema, django-stubs]
# pass_filenames: false
# entry: bash -c 'mypy -p docker-qgis -p docker-app "$@"' --

ci:
autofix_prs: true
autoupdate_schedule: quarterly

0 comments on commit eb353b4

Please sign in to comment.