Skip to content

Commit 0438a65

Browse files
committed
#137 Remove unused functions
1 parent ea45f26 commit 0438a65

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

xarray_dataclasses/typing.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,6 @@ def get_field_type(type_: Any) -> FieldType:
330330
raise TypeError(f"Could not find any field type in {type_!r}.")
331331

332332

333-
def get_inner(hint: Any, *indexes: int) -> Any:
334-
"""Return an inner type hint by indexes."""
335-
if not indexes:
336-
return hint
337-
338-
index, indexes = indexes[0], indexes[1:]
339-
return get_inner(get_args(hint)[index], *indexes)
340-
341-
342333
def get_repr_type(type_: Any) -> Any:
343334
"""Parse a type and return an representative type.
344335
@@ -361,26 +352,3 @@ class Temporary:
361352
return get_args(unannotated)[0]
362353

363354
return unannotated
364-
365-
366-
def is_str_literal(hint: Any) -> bool:
367-
"""Check if a type hint is Literal[str]."""
368-
args: Any = get_args(hint)
369-
origin = get_origin(hint)
370-
371-
if origin is not Literal:
372-
return False
373-
374-
if not len(args) == 1:
375-
return False
376-
377-
return isinstance(args[0], str)
378-
379-
380-
def unannotate(hint: Any) -> Any:
381-
"""Recursively remove Annotated type hints."""
382-
383-
class Temp:
384-
__annotations__ = dict(hint=hint)
385-
386-
return get_type_hints(Temp)["hint"]

0 commit comments

Comments
 (0)