Skip to content

Commit 2a1658d

Browse files
committed
add taplo pre-commit hook
1 parent 7fd572d commit 2a1658d

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,7 @@ repos:
6363
rev: ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d
6464
hooks:
6565
- id: validate-cff
66+
- repo: https://github.com/ComPWA/taplo-pre-commit
67+
rev: v0.9.3
68+
hooks:
69+
- id: taplo-format

pyproject.toml

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
[project]
2-
authors = [
3-
{name = "xarray Developers", email = "xarray@googlegroups.com"},
4-
]
2+
authors = [{ name = "xarray Developers", email = "xarray@googlegroups.com" }]
53
classifiers = [
64
"Development Status :: 5 - Production/Stable",
75
"License :: OSI Approved :: Apache Software License",
@@ -16,16 +14,12 @@ classifiers = [
1614
]
1715
description = "N-D labeled arrays and datasets in Python"
1816
dynamic = ["version"]
19-
license = {text = "Apache-2.0"}
17+
license = { text = "Apache-2.0" }
2018
name = "xarray"
2119
readme = "README.md"
2220
requires-python = ">=3.10"
2321

24-
dependencies = [
25-
"numpy>=1.24",
26-
"packaging>=23.2",
27-
"pandas>=2.1",
28-
]
22+
dependencies = ["numpy>=1.24", "packaging>=23.2", "pandas>=2.1"]
2923

3024
# We don't encode minimum requirements here (though if we can write a script to
3125
# generate the text from `min_deps_check.py`, that's welcome...). We do add
@@ -50,7 +44,16 @@ dev = [
5044
"sphinx_autosummary_accessors",
5145
"xarray[complete]",
5246
]
53-
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
47+
io = [
48+
"netCDF4",
49+
"h5netcdf",
50+
"scipy",
51+
'pydap; python_version<"3.10"',
52+
"zarr",
53+
"fsspec",
54+
"cftime",
55+
"pooch",
56+
]
5457
etc = ["sparse"]
5558
parallel = ["dask[complete]"]
5659
viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"]
@@ -67,10 +70,7 @@ dask = "xarray.namedarray.daskmanager:DaskManager"
6770

6871
[build-system]
6972
build-backend = "setuptools.build_meta"
70-
requires = [
71-
"setuptools>=42",
72-
"setuptools-scm>=7",
73-
]
73+
requires = ["setuptools>=42", "setuptools-scm>=7"]
7474

7575
[tool.setuptools]
7676
packages = ["xarray"]
@@ -94,10 +94,7 @@ exclude_lines = ["pragma: no cover", "if TYPE_CHECKING"]
9494

9595
[tool.mypy]
9696
enable_error_code = ["ignore-without-code", "redundant-self", "redundant-expr"]
97-
exclude = [
98-
'build',
99-
'xarray/util/generate_.*\.py',
100-
]
97+
exclude = ['build', 'xarray/util/generate_.*\.py']
10198
files = "xarray"
10299
show_error_context = true
103100
warn_redundant_casts = true
@@ -228,10 +225,7 @@ module = ["xarray.namedarray.*", "xarray.tests.test_namedarray"]
228225
# reportMissingTypeStubs = false
229226

230227
[tool.ruff]
231-
extend-exclude = [
232-
"doc",
233-
"_typed_ops.pyi",
234-
]
228+
extend-exclude = ["doc", "_typed_ops.pyi"]
235229

236230
[tool.ruff.lint]
237231
extend-select = [
@@ -249,7 +243,7 @@ extend-select = [
249243
"RUF",
250244
]
251245
extend-safe-fixes = [
252-
"TID252", # absolute imports
246+
"TID252", # absolute imports
253247
]
254248
ignore = [
255249
"E402", # module level import not at top of file
@@ -327,7 +321,7 @@ filterwarnings = [
327321
"default:the `pandas.MultiIndex` object:FutureWarning:xarray.tests.test_variable",
328322
"default:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning",
329323
"default:Duplicate dimension names present:UserWarning:xarray.namedarray.core",
330-
"default:::xarray.tests.test_strategies", # TODO: remove once we know how to deal with a changed signature in protocols
324+
"default:::xarray.tests.test_strategies", # TODO: remove once we know how to deal with a changed signature in protocols
331325
]
332326

333327
log_cli_level = "INFO"

0 commit comments

Comments
 (0)