Skip to content

Commit

Permalink
Enable black as a pre-commit hook (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcao-bdai authored Nov 30, 2023
1 parent 3dec5a8 commit 8339b8f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
# - repo: https://github.com/charliermarsh/ruff-pre-commit
# # Ruff version.
# rev: 'v0.1.0'
# hooks:
# - id: ruff
# args: ['--fix', '--config', 'pyproject.toml']

- repo: https://github.com/psf/black
rev: 23.10.0
hooks:
- id: black
language_version: python3.10
args: ['--config', 'pyproject.toml']
verbose: true

# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v1.6.1
# hooks:
# - id: mypy
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ Install the current code base from GitHub and pip install a link to that cloned
git clone https://github.com/bdaiinstitute/spatialmath-python.git
cd spatialmath-python
pip install -e .
# Optional: if you would like to contribute and commit code changes to the repository,
# pre-commit install
```

## Dependencies
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ dependencies = [
"matplotlib",
"ansitable",
"typing_extensions",
"pre-commit",
]

[project.urls]
Expand Down

0 comments on commit 8339b8f

Please sign in to comment.