Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pytest pre commit hook #210

Merged
merged 12 commits into from
Jun 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 4 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
black==23.3.0
mypy==1.3.0
openai==0.27.8
pre-commit==3.3.3
pytest==7.3.1
ruff==0.0.272
termcolor==2.3.0
typer==0.9.0
pytest==7.3.1
mypy==1.3.0