Skip to content

Commit

Permalink
Merge pull request #508 from neutrinoceros/sty/black2ruff
Browse files Browse the repository at this point in the history
STY: migrate formatting from black to ruff
  • Loading branch information
jzuhone authored Nov 15, 2024
2 parents 61d9f80 + 9e43128 commit c5c502d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,18 @@ repos:
- id: check-yaml
- id: check-toml

- repo: https://github.com/psf/black
rev: 24.10.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.19.1
hooks:
- id: blacken-docs
additional_dependencies: [black==24.1.1]
additional_dependencies: [black==24.10.0]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.2
hooks:
- id: ruff-format
- id: ruff
args: [--fix, --show-fixes]

Expand Down
5 changes: 3 additions & 2 deletions unyt/_array_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
)


Expand Down

0 comments on commit c5c502d

Please sign in to comment.