Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Nov 2, 2024
1 parent ab911bd commit 89a26a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 3 additions & 1 deletion src/legendhpges/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,4 +220,6 @@ def surface_area(self, surface_indices: list | None = None) -> Quantity:
r = r[surface_indices]
z = z[surface_indices]

return np.sum(np.where(dr == 0, abs(dz) * r[:-1] * 2 * np.pi, abs(dr) * dl * np.pi))
return np.sum(
np.where(dr == 0, abs(dz) * r[:-1] * 2 * np.pi, abs(dr) * dl * np.pi)
)
6 changes: 2 additions & 4 deletions tests/test_det_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import pathlib

import numpy as np
import pytest
from legendmeta import TextDB
from legendtestdata import LegendTestData
Expand All @@ -29,6 +28,5 @@ def test_surface_area(test_data_configs):
reg = geant4.Registry()
gedet = make_hpge(test_data_configs + "/C99000A.json", registry=reg)

assert gedet.surface_area(surface_indices=[])==0
assert gedet.surface_area(surface_indices=None)>0

assert gedet.surface_area(surface_indices=[]) == 0
assert gedet.surface_area(surface_indices=None) > 0

0 comments on commit 89a26a3

Please sign in to comment.