EDDN/.pre-commit-config.yaml
Athanasius 59d5e2676a
requirements: Updated to pass 'safety' checks
* We do need to specify `wheel` version.
* We need to specify `webtest`, as at least one test uses it.
* Bumped the version of some modules as per `safety` report.
2022-11-14 11:51:05 +00:00

88 lines
2.4 KiB
YAML

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 'v4.1.0'
hooks:
- id: check-merge-conflict
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
#- repo: https://github.com/pre-commit/mirrors-autopep8
# rev: ''
# hooks:
# - id: autopep8
# flake8 --show-source <file>
- repo: https://gitlab.com/pycqa/flake8
rev: '3.9.2'
hooks:
- id: flake8
additional_dependencies: [
flake8-annotations-coverage,
flake8-cognitive-complexity,
flake8-comprehensions,
flake8-docstrings,
flake8-isort,
flake8-json,
flake8-noqa,
flake8-use-fstring
]
# Try using local flake8
### - repo: local
### hooks:
### - id: flake8
### name: flake8
### entry: flake8
### language: system
### types: [ python ]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: 'v1.9.0'
hooks:
- id: python-no-eval
- id: python-no-log-warn
# This is a pain where a comment begins with the word 'type' otherwise
# - id: python-use-type-annotations
# mypy - static type checking
# mypy --follow-imports skip <file>
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v0.941'
hooks:
- id: mypy
additional_dependencies: [ types-requests, types-setuptools, types-simplejson]
# args: [ "--follow-imports", "skip", "--ignore-missing-imports", "--scripts-are-modules" ]
### # pydocstyle.exe <file>
### - repo: https://github.com/FalconSocial/pre-commit-mirrors-pep257
### rev: ''
### hooks:
### - id: pep257 # docstring conventions
### # Alternate https://github.com/PyCQA/pydocstyle
# - repo: https://github.com/digitalpulp/pre-commit-php
# rev: ''
# hooks:
# -id: php-unit
# safety.exe check -r requirements.txt
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: 'v1.2.4'
hooks:
- id: python-safety-dependencies-check
name: safety
entry: safety
args: [check, --bare, --file ]
language: system
files: requirements-dev.txt
default_language_version:
python: python3.9
default_stages: [ commit, push ]
#files: '([^\.].+/)*.py'