Skip to content

Commit 0b66d79

Browse files
committed
Move to Ruff's formatter instead of black
1 parent f5d74f0 commit 0b66d79

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
66

77
## Unreleased
88

9+
Fixed:
10+
- Attributes are not lost when regridding with the conservative method.
11+
12+
Changed:
13+
- Moved to the Ruff formatter, instead of black.
14+
915
## v0.2.2 (20203-11-24)
1016

1117
Added:

pyproject.toml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ benchmarking = [
4646
dev = [
4747
"hatch",
4848
"ruff",
49-
"black[jupyter]",
5049
"mypy",
5150
"pytest",
5251
"pytest-cov",
@@ -63,22 +62,19 @@ features = ["dev", "benchmarking"]
6362
lint = [
6463
"ruff check .",
6564
"mypy src",
66-
"black --check --diff .",
65+
"ruff format . --check",
6766
]
68-
format = ["black .", "lint",]
67+
format = ["ruff format .", "lint",]
6968
test = ["pytest ./src/ ./tests/ --doctest-modules",]
7069
coverage = [
7170
"pytest --cov --cov-report term --cov-report xml --junitxml=xunit-result.xml tests/",
7271
]
7372

74-
[tool.black]
75-
target-version = ["py310"]
76-
line-length = 88
77-
skip-string-normalization = true
78-
7973
[tool.ruff]
8074
target-version = "py310"
8175
line-length = 88
76+
77+
[tool.ruff.lint]
8278
select = [
8379
"A",
8480
"ARG",
@@ -115,19 +111,21 @@ ignore = [
115111
"S105", "S106", "S107",
116112
# Ignore complexity
117113
"C901", "PLR0911", "PLR0912", "PLR0913", "PLR0915",
114+
# Causes conflicts with formatter
115+
"ISC001",
118116
]
119117
unfixable = [
120118
# Don't touch unused imports
121119
"F401",
122120
]
123121

124-
[tool.ruff.isort]
122+
[tool.ruff.lint.isort]
125123
known-first-party = ["xarray_regrid"]
126124

127-
[tool.ruff.flake8-tidy-imports]
125+
[tool.ruff.lint.flake8-tidy-imports]
128126
ban-relative-imports = "all"
129127

130-
[tool.ruff.per-file-ignores]
128+
[tool.ruff.lint.per-file-ignores]
131129
# Tests can use magic values, assertions, and relative imports
132130
"tests/**/*" = ["PLR2004", "S101", "TID252"]
133131

0 commit comments

Comments
 (0)