Skip to content

Commit

Permalink
Replace black with ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
itssimon committed Nov 5, 2023
1 parent d0106db commit 23fdcd0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 66 deletions.
5 changes: 1 addition & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,12 @@ repos:
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
- repo: https://github.com/psf/black
rev: "23.10.1"
hooks:
- id: black
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.1.3
hooks:
- id: ruff
args: ["--fix", "--exit-non-zero-on-fix"]
- id: ruff-format
- repo: https://github.com/python-poetry/poetry
rev: "1.6.1"
hooks:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

format:
ruff check apitally tests --fix --select I
black apitally tests
ruff format apitally tests

check:
ruff check apitally tests
ruff format --diff apitally tests
mypy --install-types --non-interactive apitally tests
black --check --diff apitally tests
poetry check

test:
Expand Down
57 changes: 2 additions & 55 deletions poetry.lock

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

6 changes: 1 addition & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ requests = { version = ">=2.26.0", optional = true }
starlette = { version = ">=0.21.0,<1.0.0", optional = true }

[tool.poetry.group.dev.dependencies]
black = "^23.10.1"
mypy = "^1.6.1"
pre-commit = "^3.5.0"
ruff = "^0.1.3"
Expand Down Expand Up @@ -72,13 +71,10 @@ enable = true
style = "semver"
vcs = "git"

[tool.black]
line-length = 120
target-version = ["py311"]

[tool.ruff]
ignore = ["E501"]
select = ["E", "F", "W", "I"]
line-length = 120
target-version = "py311"

[tool.ruff.isort]
Expand Down

0 comments on commit 23fdcd0

Please sign in to comment.