diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 29eef639..2b8d05c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,20 +20,18 @@ repos: - id: check-yaml - id: check-toml -- repo: https://github.com/psf/black - rev: 24.8.0 - hooks: - - id: black - +# TODO: replace this with ruff when it supports embedded python blocks +# see https://github.com/astral-sh/ruff/issues/8237 - repo: https://github.com/adamchainz/blacken-docs rev: 1.18.0 hooks: - id: blacken-docs - additional_dependencies: [black==24.1.1] + additional_dependencies: [black==24.3.0] - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.6.3 hooks: + - id: ruff-format - id: ruff args: [--fix, --show-fixes] diff --git a/unyt/_array_functions.py b/unyt/_array_functions.py index 7d6bcb3b..d85c4592 100644 --- a/unyt/_array_functions.py +++ b/unyt/_array_functions.py @@ -570,8 +570,9 @@ def nanquantile(a, *args, **kwargs): @implements(np.linalg.det) def linalg_det(a, *args, **kwargs): - return np.linalg.det._implementation(np.asarray(a), *args, **kwargs) * a.units ** ( - a.shape[0] + return ( + np.linalg.det._implementation(np.asarray(a), *args, **kwargs) + * a.units ** (a.shape[0]) )