Skip to content

Commit 921086a

Browse files
committed
Rm unused FieldXmf._get_entry
1 parent c73bd79 commit 921086a

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

stagpy/stagyyparsers.py

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,13 @@
3636
Mapping,
3737
Optional,
3838
Tuple,
39-
TypeVar,
4039
)
4140
from xml.etree.ElementTree import Element
4241

4342
from numpy import ndarray
4443
from numpy.typing import NDArray
4544
from pandas import DataFrame
4645

47-
T = TypeVar("T")
48-
4946

5047
def _tidy_names(
5148
names: List[str], nnames: int, extra_names: Optional[List[str]] = None
@@ -837,21 +834,6 @@ def field_subdomains(self, path_root: Path, name: str) -> Iterator[FieldSub]:
837834
class FieldXmf:
838835
path: Path
839836

840-
def _maybe_get(
841-
self,
842-
elt: Element,
843-
item: str,
844-
info: str,
845-
conversion: Callable[[str], T],
846-
) -> Optional[T]:
847-
"""Extract and convert info if item is present."""
848-
maybe_item = elt.find(item)
849-
if maybe_item is not None:
850-
maybe_info = maybe_item.get(info)
851-
if maybe_info is not None:
852-
return conversion(maybe_info)
853-
return None
854-
855837
@cached_property
856838
def _data(self) -> Mapping[int, XmfEntry]:
857839
xs = XmlStream(filepath=self.path)

0 commit comments

Comments
 (0)