Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonycorletti committed Jun 9, 2022
1 parent 00667de commit b39a2b4
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 14 deletions.
51 changes: 51 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-added-large-files
- id: check-toml
- id: check-yaml
args:
- --unsafe
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/asottile/pyupgrade
rev: v2.32.1
hooks:
- id: pyupgrade
args:
- --py3-plus
- --keep-runtime-typing
- repo: https://github.com/myint/autoflake
rev: v1.4
hooks:
- id: autoflake
args:
- --recursive
- --in-place
- --remove-all-unused-imports
- --remove-unused-variables
- --expand-star-imports
- --exclude
- __init__.py
- --remove-duplicate-keys
- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
ci:
autofix_commit_msg: "[pre-commit.ci] Auto-fix from pre-commit"
autoupdate_commit_msg: "[pre-commit.ci] Auto-update from pre-commit"
29 changes: 15 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,27 @@ readme = "README.md"
classifiers = ["License :: OSI Approved :: MIT License"]
dynamic = ["version", "description"]
dependencies = [
"fastapi>=0.70.1",
"gunicorn>=20.1.0",
"uvicorn>=0.16.0",
"google-cloud-firestore>=2.3.4"
"fastapi >=0.70.1",
"gunicorn >=20.1.0",
"uvicorn >=0.16.0",
"google-cloud-firestore >=2.3.4"
]

[project.optional-dependencies]
test = [
"pytest>=6.2.5",
"mypy>=0.910",
"coverage>=6.1.1",
"pytest-cov>=3.0.0",
"mock-firestore>=0.10.0"
"pytest >=6.2.5",
"coverage >=6.1.1",
"pytest-cov >=3.0.0",
"mock-firestore >=0.10.0"
]
dev = [
"flake8>=3.9.2",
"black>=21.10b0",
"isort>=5.9.3",
"autoflake>=1.4",
"flake8-docstrings>=1.6.0",
"mypy >=0.910",
"flake8 >=3.9.2",
"black >=21.10b0",
"isort >=5.9.3",
"autoflake >=1.4",
"flake8-docstrings >=1.6.0",
"pre-commit >=2.4.0",
]

[project.urls]
Expand Down
1 change: 1 addition & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ pip install --upgrade pip
pip install flit

flit install --deps=all --extras=all --symlink
pre-commit install

0 comments on commit b39a2b4

Please sign in to comment.