Added pytest, excluded tests from precommit

This commit is contained in:
agres
2025-03-19 01:22:38 +01:00
parent 12096b2ec0
commit 8d407d3d52
2 changed files with 23 additions and 1 deletions
+22 -1
View File
@@ -6,23 +6,44 @@ repos:
rev: v5.0.0 rev: v5.0.0
hooks: hooks:
- id: trailing-whitespace # Remove trailing whitespace - id: trailing-whitespace # Remove trailing whitespace
exclude: '.*test.*'
files: \.(py)$
- id: end-of-file-fixer # Ensure a single newline at the end of a file - id: end-of-file-fixer # Ensure a single newline at the end of a file
exclude: '.*test.*'
files: \.(py)$
- id: check-yaml # Check if the YAML files are valid - id: check-yaml # Check if the YAML files are valid
exclude: '.*test.*'
files: \.(yaml|yml)$
- id: check-json # Check if the JSON files are valid - id: check-json # Check if the JSON files are valid
exclude: '.*test.*'
files: \.(json)$
- id: check-added-large-files # Prevent large files from being committed - id: check-added-large-files # Prevent large files from being committed
args: ['--maxkb=1000'] args: ['--maxkb=1000']
- id: check-ast # Check for parse errors in Python files - id: check-ast # Check for parse errors in Python files
exclude: '.*test.*'
files: \.(py)$
- id: debug-statements # Check for print statements and pdb calls - id: debug-statements # Check for print statements and pdb calls
- id: end-of-file-fixer # Ensure a single newline at the end of a file exclude: '.*test.*'
files: \.(py)$
- 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
args: ['--profile=black'] args: ['--profile=black']
files: \.(py)$
exclude: '.*test.*'
- repo: https://github.com/PyCQA/flake8 - repo: https://github.com/PyCQA/flake8
rev: 7.1.1 rev: 7.1.1
hooks: hooks:
- id: flake8 - id: flake8
args: ['--extend-ignore=E501,E402,W503,E721','--max-line-length=100'] args: ['--extend-ignore=E501,E402,W503,E721','--max-line-length=100']
files: \.(py)$
exclude: '.*test.*'
+1
View File
@@ -1,3 +1,4 @@
python-dotenv==1.0.1 python-dotenv==1.0.1
requests==2.32.3 requests==2.32.3
pre-commit==4.1.0 pre-commit==4.1.0
pytest==8.3.5