This commit is contained in:
Johan
2026-02-02 15:50:27 +01:00
parent 0d0dd3cfcf
commit b3246c0232

View File

@@ -24,8 +24,6 @@ repos:
- id: mixed-line-ending - id: mixed-line-ending
name: Fix mixed line endings name: Fix mixed line endings
args: ['--fix=lf'] args: ['--fix=lf']
# Python code formatting (Black)
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 24.1.1 rev: 24.1.1
hooks: hooks:
@@ -33,16 +31,12 @@ repos:
name: Format code with black name: Format code with black
language_version: python3 language_version: python3
args: ['--line-length=100'] args: ['--line-length=100']
# Import sorting (isort)
- repo: https://github.com/PyCQA/isort - repo: https://github.com/PyCQA/isort
rev: 5.13.2 rev: 5.13.2
hooks: hooks:
- id: isort - id: isort
name: Sort imports with isort name: Sort imports with isort
args: ['--profile=black'] args: ['--profile=black']
# Linting (Flake8)
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 7.0.0 rev: 7.0.0
hooks: hooks:
@@ -50,17 +44,12 @@ repos:
name: Lint code with flake8 name: Lint code with flake8
args: ['--max-line-length=100', '--ignore=E203,W503,D100,D101,D102,D103,D104,D105,D106,B008'] args: ['--max-line-length=100', '--ignore=E203,W503,D100,D101,D102,D103,D104,D105,D106,B008']
additional_dependencies: ['flake8-bugbear'] additional_dependencies: ['flake8-bugbear']
# Security checks (Bandit)
# YAML linting
- repo: https://github.com/adrienverge/yamllint - repo: https://github.com/adrienverge/yamllint
rev: v1.33.0 rev: v1.33.0
hooks: hooks:
- id: yamllint - id: yamllint
name: Lint YAML files name: Lint YAML files
args: ['-d', '{extends: relaxed, rules: {line-length: {max: 120}}}'] args: ['-d', '{extends: relaxed, rules: {line-length: {max: 120}}}']
ci: ci:
autofix_commit_msg: 'chore: auto-fixes from pre-commit hooks' autofix_commit_msg: 'chore: auto-fixes from pre-commit hooks'
autofix_prs: true autofix_prs: true