Skip to content

Commit

Permalink
run type checks
Browse files Browse the repository at this point in the history
  • Loading branch information
roosre committed Sep 5, 2024
1 parent 1de65e0 commit 56efea4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ansys/dpf/composites/_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def by_id_as_array(self, entity_id: int) -> Optional[NDArray[np.int64]]:

def _has_data_pointer(field: PropertyField | Field) -> bool:
if (
field._data_pointer is not None
field._data_pointer is not None # pylint: disable=protected-access
and field._data_pointer.any() # pylint: disable=protected-access
):
return True
Expand Down Expand Up @@ -392,7 +392,7 @@ def by_id(self, entity_id: int) -> Optional[np.double]:
if values is None or len(values) == 0:
return None
if len(values) == 1:
return values[0]
return cast(np.double, values[0])

raise RuntimeError("FieldIndexerWithDataPointer: by_id cannot be used for a list of data.")

Expand Down

0 comments on commit 56efea4

Please sign in to comment.