Skip to content

Commit

Permalink
Replace black with ruff format
Browse files Browse the repository at this point in the history
  • Loading branch information
sankichi92 committed Nov 4, 2023
1 parent 7d6f776 commit 4faef3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ jobs:
- name: Install dependencies
run: rye sync

- name: Lint with black
run: rye run lint:black
- name: Lint with ruff format
run: rye run lint:ruff:format

- name: Lint with ruff
run: rye run lint:ruff
- name: Lint with ruff check
run: rye run lint:ruff:check

- name: Type check with pyright
run: rye run lint:pyright
Expand Down
15 changes: 7 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ build-backend = "hatchling.build"
[tool.rye]
managed = true
dev-dependencies = [
"ruff>=0.0.287",
"ruff>=0.1.4",
"pyright>=1.1.325",
"types-requests>=2.31.0.2",
"pytest>=7.4.1",
Expand All @@ -37,19 +37,18 @@ dev-dependencies = [
"matplotlib>=3.7.2",
"folium>=0.14.0",
"mapclassify>=2.6.0",
"black[jupyter]>=23.9.0",
"rioxarray>=0.15.0",
]

[tool.rye.scripts]
test = "pytest"
lint = { chain = ["lint:black", "lint:ruff", "lint:pyright"] }
"lint:black" = "black --check ."
"lint:ruff" = "ruff check ."
lint = { chain = ["lint:ruff:format", "lint:ruff:check", "lint:pyright"] }
"lint:ruff:format" = "ruff format . --check"
"lint:ruff:check" = "ruff check ."
"lint:pyright" = "pyright"
fix = { chain = ["fix:black", "fix:ruff"] }
"fix:black" = "black ."
"fix:ruff" = "ruff check . --fix"
fix = { chain = ["fix:ruff:format", "fix:ruff:check"] }
"fix:ruff:format" = "ruff format ."
"fix:ruff:check" = "ruff check . --fix"
doc = "mkdocs serve"
"doc:build" = "mkdocs build"

Expand Down

0 comments on commit 4faef3a

Please sign in to comment.