Skip to content

Commit

Permalink
Add formatter pre-commit hook (#310)
Browse files Browse the repository at this point in the history
  • Loading branch information
whabanks authored Jul 30, 2024
1 parent 2777615 commit be08ae2
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .devcontainer/scripts/notify-dev-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@ poetry completions zsh > ~/.zfunc/_poetry

# Install dependencies
poetry install

# Install pre-commit hooks
git config --global --add safe.directory /workspaces/notification-utils
poetry run pre-commit install
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
hooks:
# Run the linter
- id: ruff
args: [ --fix ]
# Run the formatter
- id: ruff-format
119 changes: 118 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ markupsafe = "2.1.5"
mistune = "0.8.4"
ordered-set = "4.1.0"
phonenumbers = "8.13.36"
pre-commit = "^3.7.1"
py_w3c = "0.3.1"
pypdf2 = "1.28.6"
python-json-logger = "2.0.7"
Expand Down

0 comments on commit be08ae2

Please sign in to comment.