Add pytest pre commit hook (#210)

This commit is contained in:
Patilla Code
2023-06-20 11:56:57 +02:00
committed by GitHub
parent ac4491ab93
commit dc834e6ad2
4 changed files with 18 additions and 11 deletions

View File

@@ -10,5 +10,5 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
- uses: pre-commit/action@v3.0.0

View File

@@ -2,14 +2,20 @@
# See https://pre-commit.com/hooks.html for more hooks
fail_fast: true
repos:
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black
args: [--config, pyproject.toml]
types: [python]
exclude: .+/migrations((/.+)|(\.py))
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.272"
@@ -26,7 +32,3 @@ repos:
id: end-of-file-fixer
id: trailing-whitespace
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
hooks:
- id: mypy

View File

@@ -9,10 +9,13 @@ readme = "README.md"
requires-python = ">=3"
dependencies = [
'black == 23.3.0',
'mypy == 1.3.0',
'openai == 0.27.8',
'ruff == 0.0.272',
'pre-commit == 3.3.3',
'typer == 0.9.0'
'pytest == 7.3.1',
'ruff == 0.0.272',
'termcolor==2.3.0',
'typer == 0.9.0',
]
[project.scripts]

View File

@@ -1,7 +1,9 @@
black==23.3.0
mypy==1.3.0
openai==0.27.8
pre-commit==3.3.3
ruff==0.0.272
typer==0.9.0
pytest==7.3.1
mypy==1.3.0
ruff==0.0.272
termcolor==2.3.0
typer==0.9.0