Skip to content

Commit

Permalink
fix ruff
Browse files Browse the repository at this point in the history
Signed-off-by: nstarman <nstarman@users.noreply.github.com>
  • Loading branch information
nstarman committed Dec 22, 2023
1 parent f0a22b0 commit 88bd79c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN401", # Dynamically typed expressions (typing.Any) are disallowed
"ARG001", # Unused function argument # TODO: resolve
"COM812", # <- for ruff.format
"D103", # Missing docstring in public function # TODO: resolve
"D105", # Missing docstring in magic method
"D203", # 1 blank line required before class docstring
Expand Down
4 changes: 1 addition & 3 deletions src/jax_quantity/_register_primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ def register(primitive: jax.core.Primitive) -> Callable[[T], T]:

def _to_value_rad_or_one(q: Quantity) -> ArrayLike:
return (
q.to_value(radian)
if can_convert(q.unit, radian)
else q.to_value(dimensionless)
q.to_value(radian) if can_convert(q.unit, radian) else q.to_value(dimensionless)
)


Expand Down

0 comments on commit 88bd79c

Please sign in to comment.