Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
polinaeterna committed Dec 27, 2024
1 parent 359a30b commit 0744e07
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions services/worker/tests/test_statistics_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def count_expected_statistics_for_numerical_column(
}


def count_expected_statistics_for_list_column(column: pd.Series) -> dict[str, Any]:
def count_expected_statistics_for_list_column(column: pd.Series) -> dict[str, Any]: # type: ignore
if column.isnull().all():
lengths_column = pd.Series([None] * column.shape[0])
return count_expected_statistics_for_numerical_column(lengths_column, dtype=ColumnType.INT)
Expand Down Expand Up @@ -160,7 +160,7 @@ def count_expected_statistics_for_categorical_column(
}


def count_expected_statistics_for_string_column(column: pd.Series) -> dict[str, Any]:
def count_expected_statistics_for_string_column(column: pd.Series) -> dict[str, Any]: # type: ignore
n_samples = column.shape[0]
nan_count = column.isna().sum()
value_counts = column.value_counts(dropna=True).to_dict()
Expand All @@ -183,7 +183,7 @@ def count_expected_statistics_for_string_column(column: pd.Series) -> dict[str,
return count_expected_statistics_for_numerical_column(lengths_column, dtype=ColumnType.INT)


def count_expected_statistics_for_bool_column(column: pd.Series) -> dict[str, Any]:
def count_expected_statistics_for_bool_column(column: pd.Series) -> dict[str, Any]: # type: ignore
n_samples = column.shape[0]
nan_count = column.isna().sum()
value_counts = column.value_counts(dropna=True).to_dict()
Expand Down Expand Up @@ -474,7 +474,7 @@ def test_image_statistics(
assert computed == expected


def count_expected_statistics_for_datetime_column(column: pd.Series, column_name: str) -> dict[str, Any]:
def count_expected_statistics_for_datetime_column(column: pd.Series, column_name: str) -> dict[str, Any]: # type: ignore
n_samples = column.shape[0]
nan_count = column.isna().sum()
if nan_count == n_samples:
Expand Down

0 comments on commit 0744e07

Please sign in to comment.