Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: Black infra #691

Merged
merged 1 commit into from
Dec 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# black
27ccbf2a36428272ef9f0299ff406b8bcd2a24f7
1 change: 1 addition & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ jobs:
run: pip install ruff codespell tomli
- run: make ruff
- run: make codespell-error
- uses: psf/black@stable
check-doc:
name: Doc consistency
runs-on: ubuntu-latest
Expand Down
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
files: ^(.*\.(py|yaml))$
exclude: ^(\.[^/]*cache/.*)$
repos:
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args:
- --safe
- --quiet
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.178
hooks:
Expand Down
3 changes: 2 additions & 1 deletion docs/source/v1.1.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
### Code health

- Code quality now checked by [ruff](https://github.com/charliermarsh/ruff)
({{ gh(689) }} by {{ authors.larsoner }} )
and [black](https://black.readthedocs.io/en/stable/)
({{ gh(689) }}, {{ gh(690) }}, and {{ gh(691) }} by {{ authors.larsoner }} )

[//]: # (### Bug fixes)
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,7 @@ testpaths = [
junit_family = "xunit2"

[tool.ruff]
exclude = ["**/freesurfer/contrib", "docs/", "dist/" , "build/"]
exclude = ["**/freesurfer/contrib", "dist/" , "build/"]

[tool.black]
exclude = "(.*/freesurfer/contrib/.*)|(dist/)|(build/)"