Skip to content

Commit

Permalink
Use Ruff as formatter; remove Black (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjkuson authored Dec 1, 2023
1 parent 31e5121 commit b717b45
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 86 deletions.
73 changes: 1 addition & 72 deletions poetry.lock

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

7 changes: 1 addition & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ beautifulsoup4 = "^4.12.2"
mobi = "^0.3.3"

[tool.poetry.group.dev.dependencies]
black = "^23.3.0"
pytest = "^7.3.1"
coverage = "^7.2.5"
mypy = "^1.2.0"
types-beautifulsoup4 = "^4.12.0.5"
ruff = ">=0.0.284,<0.1.7"
ruff = "^0.1"
ssort = "^0.11.6"

[tool.black]
line-length = 88
target-version = ["py310"]

[tool.ruff]
select = [
"F", # Pyflakes
Expand Down
8 changes: 4 additions & 4 deletions scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
echo "Formatting with ssort..."
ssort .

echo "Formatting with autofix ruff violation checks..."
ruff check --quiet --fix .
echo "Apply Ruff lint autofixes..."
ruff --quiet --fix .

echo "Formatting with black..."
black --quiet .
echo "Formatting with Ruff..."
ruff format .
8 changes: 4 additions & 4 deletions scripts/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
echo "Checking with ssort..."
python3 -m ssort --check .

echo "Running ruff violation checks..."
python3 -m ruff check --quiet .
echo "Checking with Ruff..."
python3 -m ruff --quiet .

echo "Checking with black..."
python3 -m black --check .
python3 -m ruff format --check .

echo "Checking with mypy..."
python3 -m mypy --strict .
python3 -m mypy --strict .

0 comments on commit b717b45

Please sign in to comment.