Skip to content

Commit 30d4985

Browse files
committed
Pass mypy
1 parent 07ff9a8 commit 30d4985

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/curies/_sssom_exploration.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
import typing
77
import unittest
88
from collections.abc import Collection, Iterable
9-
from typing import TYPE_CHECKING, Literal, TypeAlias
9+
from typing import TYPE_CHECKING, Literal
1010

1111
import pandas as pd
12+
from typing_extensions import TypeAlias
1213

1314
from curies.dataframe import (
1415
get_df_curies_index,

src/curies/dataframe.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _func(curie: str) -> bool:
4747

4848
def _get_prefixes_from_curie_column(
4949
df: pd.DataFrame, column: int | str, converter: Converter, validate: bool
50-
) -> pd.Series:
50+
) -> pd.Series[str]:
5151
return df[column].map(_get_curie_parser(converter=converter, validate=validate))
5252

5353

@@ -83,7 +83,7 @@ def get_filter_df_by_prefixes_index(
8383
method: PrefixIndexMethod | None = None,
8484
converter: Converter | None = None,
8585
validate: bool = False,
86-
) -> pd.Series:
86+
) -> pd.Series[bool]:
8787
"""Get an index of CURIEs in the given column that start with the prefix(es)."""
8888
if method == "iterative" or method is None:
8989
return df[column].map(_get_prefix_checker(prefix))
@@ -128,7 +128,7 @@ def get_filter_df_by_curies_index(
128128
df: pd.DataFrame,
129129
column: str | int,
130130
curie: str | Collection[str],
131-
) -> pd.Series:
131+
) -> pd.Series[bool]:
132132
"""Get an index of CURIEs in the given column that are the given CURIE(s)."""
133133
if isinstance(curie, str):
134134
return df[column] == curie

0 commit comments

Comments
 (0)