Skip to content

Commit

Permalink
Switch from Black to Ruff (#333)
Browse files Browse the repository at this point in the history
`ruff format` is a drop-in replacement for formatting. One fewer tool to maintain.
  • Loading branch information
john-kurkowski committed Jun 18, 2024
1 parent 0dccdfc commit 7e38f49
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,5 +269,5 @@ tox -e py311
Automatically format all code:

```zsh
black .
ruff format .
```
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ release = [
"twine",
]
testing = [
"black",
"mypy",
"pytest",
"pytest-gitignore",
Expand Down Expand Up @@ -105,7 +104,7 @@ select = [
"W",
]
ignore = [
"E501", # line too long; if Black does its job, not worried about the rare long line
"E501", # line too long; if formatter does its job, not worried about the rare long line
]

[tool.ruff.lint.pydocstyle]
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ extras = testing
[testenv:codestyle]
basepython = python3.8
commands =
black --check {posargs:.}
ruff format --check {posargs:.}
extras = testing

[testenv:lint]
Expand Down

0 comments on commit 7e38f49

Please sign in to comment.