Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/seaborn/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "0.13.2"
# Requires a version of numpy and matplotlib with a `py.typed` file
requires = ["matplotlib>=3.8", "numpy>=1.20", "pandas-stubs<2.3.3.251201"]
requires = ["matplotlib>=3.8", "numpy>=1.20", "pandas-stubs"]
upstream_repository = "https://github.com/mwaskom/seaborn"
5 changes: 2 additions & 3 deletions stubs/seaborn/seaborn/_core/data.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ from collections.abc import Mapping
from typing import TypeVar, overload

from pandas import DataFrame
from pandas.core.interchange.dataframe_protocol import DataFrame as DataFrameProtocol
from seaborn._core.typing import DataSource, VariableSpec
from seaborn._core.typing import DataSource, SupportsDataFrame, VariableSpec

_T = TypeVar("_T", Mapping[Incomplete, Incomplete], None)

Expand All @@ -22,5 +21,5 @@ class PlotData:
@overload
def handle_data_source(data: _T) -> _T: ...
@overload
def handle_data_source(data: DataFrameProtocol) -> DataFrame: ...
def handle_data_source(data: SupportsDataFrame) -> DataFrame: ...
def convert_dataframe_to_pandas(data: object) -> DataFrame: ...
2 changes: 0 additions & 2 deletions stubs/seaborn/seaborn/_core/typing.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ from pandas import DataFrame, Index, Series, Timedelta, Timestamp

@type_check_only
class SupportsDataFrame(Protocol):
# `__dataframe__` should return pandas.core.interchange.dataframe_protocol.DataFrame
# but this class needs to be defined as a Protocol, not as an ABC.
def __dataframe__(self, nan_as_null: bool = ..., allow_copy: bool = ...): ...

ColumnName: TypeAlias = str | bytes | date | datetime | timedelta | bool | complex | Timestamp | Timedelta
Expand Down