diff --git a/src/mxcp/sdk/validator/converters.py b/src/mxcp/sdk/validator/converters.py index 5408c064..670f97ec 100644 --- a/src/mxcp/sdk/validator/converters.py +++ b/src/mxcp/sdk/validator/converters.py @@ -23,12 +23,14 @@ class TypeConverter: @staticmethod def _normalize_pandas_dataframe_nulls(value: pd.DataFrame) -> pd.DataFrame: """Convert pandas null sentinels into Python None for output handling.""" - return value.astype(object).where(value.notna(), None) + # pandas-stubs rejects None as the `other` arg of where(), but it is supported at runtime. + return value.astype(object).where(value.notna(), None) # type: ignore[call-overload,no-any-return] @staticmethod def _normalize_pandas_series_nulls(value: pd.Series) -> pd.Series: """Convert pandas null sentinels into Python None for output handling.""" - return value.astype(object).where(value.notna(), None) + # pandas-stubs rejects None as the `other` arg of where(), but it is supported at runtime. + return value.astype(object).where(value.notna(), None) # type: ignore[call-overload,no-any-return] @staticmethod def python_type_to_schema_type(python_type: str) -> str: