Skip to content

Commit 99ee8c6

Browse files
Add Pyproject pre-commit hooks (#9840)
* add taplo pre-commit hook * move TODO tamasfe/taplo#706 * add validate-pyproject pre-commit hook
1 parent 66e13a2 commit 99ee8c6

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.pre-commit-config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,13 @@ 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
70+
args: ["--option", "array_auto_collapse=false"]
71+
- repo: https://github.com/abravalheri/validate-pyproject
72+
rev: v0.23
73+
hooks:
74+
- id: validate-pyproject
75+
additional_dependencies: ["validate-pyproject-schema-store[all]"]

pyproject.toml

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
authors = [
3-
{name = "xarray Developers", email = "[email protected]"},
3+
{ name = "xarray Developers", email = "[email protected]" },
44
]
55
classifiers = [
66
"Development Status :: 5 - Production/Stable",
@@ -16,7 +16,7 @@ classifiers = [
1616
]
1717
description = "N-D labeled arrays and datasets in Python"
1818
dynamic = ["version"]
19-
license = {text = "Apache-2.0"}
19+
license = { text = "Apache-2.0" }
2020
name = "xarray"
2121
readme = "README.md"
2222
requires-python = ">=3.10"
@@ -50,7 +50,16 @@ dev = [
5050
"sphinx_autosummary_accessors",
5151
"xarray[complete]",
5252
]
53-
io = ["netCDF4", "h5netcdf", "scipy", 'pydap; python_version<"3.10"', "zarr", "fsspec", "cftime", "pooch"]
53+
io = [
54+
"netCDF4",
55+
"h5netcdf",
56+
"scipy",
57+
'pydap; python_version<"3.10"',
58+
"zarr",
59+
"fsspec",
60+
"cftime",
61+
"pooch",
62+
]
5463
etc = ["sparse"]
5564
parallel = ["dask[complete]"]
5665
viz = ["cartopy", "matplotlib", "nc-time-axis", "seaborn"]
@@ -249,7 +258,7 @@ extend-select = [
249258
"RUF",
250259
]
251260
extend-safe-fixes = [
252-
"TID252", # absolute imports
261+
"TID252", # absolute imports
253262
]
254263
ignore = [
255264
"E402", # module level import not at top of file
@@ -327,7 +336,9 @@ filterwarnings = [
327336
"default:the `pandas.MultiIndex` object:FutureWarning:xarray.tests.test_variable",
328337
"default:Using a non-tuple sequence for multidimensional indexing is deprecated:FutureWarning",
329338
"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
339+
340+
# TODO: remove once we know how to deal with a changed signature in protocols
341+
"default:::xarray.tests.test_strategies",
331342
]
332343

333344
log_cli_level = "INFO"

0 commit comments

Comments
 (0)