Skip to content

Commit

Permalink
added pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebv committed Mar 29, 2024
1 parent fb79e42 commit cb5cdb3
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ set -ex

printf "\nalias ll='ls -lahSr --color=auto'\n" >> ~/.bashrc
rye sync
rye run pre-commit install
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
- id: check-yaml
args: ["--unsafe"]
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: .+\.csv
- id: mixed-line-ending
args: [--fix=lf]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
hooks:
- id: ruff
- id: ruff-format
- repo: local
hooks:
- id: ruff-sort-imports
name: ruff-sort-imports
entry: rye run ruff check --select I .
language: system
pass_filenames: false
types: [python]
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ dev-dependencies = [
"pytest-cov>=4.1.0",
"respx>=0.20.2",
"time-machine>=2.14.0",
# Development
"pre-commit>=3.7.0",
]

[tool.hatch.version]
Expand Down
17 changes: 17 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ certifi==2024.2.2
# via httpcore
# via httpx
# via requests
cfgv==3.4.0
# via pre-commit
charset-normalizer==3.3.2
# via requests
click==8.1.7
Expand All @@ -27,6 +29,10 @@ colorama==0.4.6
coverage==7.4.3
# via coverage
# via pytest-cov
distlib==0.3.8
# via virtualenv
filelock==3.13.3
# via virtualenv
ghp-import==2.1.0
# via mkdocs
griffe==0.41.3
Expand All @@ -38,6 +44,8 @@ httpcore==1.0.4
httpx==0.27.0
# via aiosalesforce
# via respx
identify==2.5.35
# via pre-commit
idna==3.6
# via anyio
# via httpx
Expand Down Expand Up @@ -78,6 +86,8 @@ mkdocstrings-python==1.8.0
mypy==1.8.0
mypy-extensions==1.0.0
# via mypy
nodeenv==1.8.0
# via pre-commit
orjson==3.9.15
# via aiosalesforce
packaging==23.2
Expand All @@ -90,8 +100,10 @@ pathspec==0.12.1
platformdirs==4.2.0
# via mkdocs
# via mkdocstrings
# via virtualenv
pluggy==1.4.0
# via pytest
pre-commit==3.7.0
pygments==2.17.2
# via mkdocs-material
pymdown-extensions==10.7.1
Expand All @@ -107,6 +119,7 @@ python-dateutil==2.9.0.post0
# via time-machine
pyyaml==6.0.1
# via mkdocs
# via pre-commit
# via pymdown-extensions
# via pyyaml-env-tag
pyyaml-env-tag==0.1
Expand All @@ -127,5 +140,9 @@ typing-extensions==4.10.0
# via mypy
urllib3==2.2.1
# via requests
virtualenv==20.25.1
# via pre-commit
watchdog==4.0.0
# via mkdocs
setuptools==69.2.0
# via nodeenv

0 comments on commit cb5cdb3

Please sign in to comment.