Skip to content

Commit 8339b8f

Browse files
authored
Enable black as a pre-commit hook (#98)
1 parent 3dec5a8 commit 8339b8f

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repos:
2+
# - repo: https://github.com/charliermarsh/ruff-pre-commit
3+
# # Ruff version.
4+
# rev: 'v0.1.0'
5+
# hooks:
6+
# - id: ruff
7+
# args: ['--fix', '--config', 'pyproject.toml']
8+
9+
- repo: https://github.com/psf/black
10+
rev: 23.10.0
11+
hooks:
12+
- id: black
13+
language_version: python3.10
14+
args: ['--config', 'pyproject.toml']
15+
verbose: true
16+
17+
# - repo: https://github.com/pre-commit/mirrors-mypy
18+
# rev: v1.6.1
19+
# hooks:
20+
# - id: mypy

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ Install the current code base from GitHub and pip install a link to that cloned
130130
git clone https://github.com/bdaiinstitute/spatialmath-python.git
131131
cd spatialmath-python
132132
pip install -e .
133+
# Optional: if you would like to contribute and commit code changes to the repository,
134+
# pre-commit install
133135
```
134136

135137
## Dependencies

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ dependencies = [
4040
"matplotlib",
4141
"ansitable",
4242
"typing_extensions",
43+
"pre-commit",
4344
]
4445

4546
[project.urls]

0 commit comments

Comments
 (0)