forked from MAIF/eurybia
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add pyproject.toml, ruff and mypy
- Loading branch information
Thierry Loron
committed
Jul 29, 2024
1 parent
3591827
commit 10d4a07
Showing
44 changed files
with
41,214 additions
and
41,207 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,58 @@ | ||
--- | ||
default_language_version: | ||
python: python3 | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.6.0 | ||
hooks: | ||
- id: check-ast | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-executables-have-shebangs | ||
- id: check-json | ||
- id: check-yaml | ||
exclude: ^chart/ | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: check-ast | ||
- id: check-byte-order-marker | ||
- id: check-case-conflict | ||
- id: check-docstring-first | ||
- id: check-json | ||
- id: check-yaml | ||
exclude: ^(chart/|docs/) | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
exclude: ^(docs/|gdocs/) | ||
- id: pretty-format-json | ||
- id: pretty-format-json | ||
args: ['--autofix'] | ||
- id: trailing-whitespace | ||
- id: trailing-whitespace | ||
args: ['--markdown-linebreak-ext=md'] | ||
exclude: ^(docs/|gdocs/) | ||
- id: mixed-line-ending | ||
- id: mixed-line-ending | ||
args: ['--fix=lf'] | ||
exclude: ^(docs/|gdocs/) | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
- id: check-added-large-files | ||
args: ['--maxkb=500'] | ||
- id: no-commit-to-branch | ||
args: ['--branch', 'master', '--branch', 'develop'] | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
rev: v0.5.2 | ||
hooks: | ||
- id: black | ||
args: [--line-length=120] | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v0.941' | ||
- id: ruff | ||
args: [--fix] | ||
- id: ruff-format | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: 'v1.10.1' | ||
hooks: | ||
- id: mypy | ||
args: [--ignore-missing-imports, --show-error-codes] | ||
files: eurybia | ||
additional_dependencies: [types-PyYAML] | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
- id: mypy | ||
args: [--config-file=pyproject.toml] | ||
files: src | ||
# Décommentez si vous utilisez pydantic (+ ajustez la version): | ||
# additional_dependencies: [pydantic~=1.0] | ||
- repo: https://github.com/pypa/pip-audit | ||
rev: v2.7.3 | ||
hooks: | ||
- id: flake8 | ||
exclude: ^tests/ | ||
args: ['--ignore=E501,D2,D3,D4,D104,D100,D106,D107,W503,D105,E203'] | ||
additional_dependencies: [flake8-docstrings] | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.4.2 | ||
- id: pip-audit | ||
args: [--skip-editable, --fix] | ||
# - repo: https://github.com/gitleaks/gitleaks | ||
# rev: v8.18.2 | ||
# hooks: | ||
# - id: gitleaks | ||
- repo: https://github.com/compilerla/conventional-pre-commit | ||
rev: v3.3.0 | ||
hooks: | ||
- id: isort | ||
args: ["--profile", "black", "-l", "120"] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.7.2 | ||
hooks: | ||
- id: pyupgrade | ||
args: [--py37-plus] | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.8.0 | ||
hooks: | ||
- id: blacken-docs | ||
additional_dependencies: [black==21.12b0] | ||
- id: conventional-pre-commit | ||
stages: [commit-msg] | ||
args: [] # optional: list of Conventional Commits types to allow e.g. [feat, fix, ci, chore, test] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.