[geopandas] Some @final methods are overridden (#14657)

This commit is contained in:
Sebastian Rittau
2025-08-28 12:44:31 +02:00
committed by GitHub
parent ff32af2c65
commit 014818de79
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -68,7 +68,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
geometry: _GeomCol | None = None,
crs: _ConvertibleToCRS | None = None,
) -> None: ...
def __setattr__(self, attr: str, val: Any) -> None: ... # Can set arbitrary objects
def __setattr__(self, attr: str, val: Any) -> None: ... # type: ignore[misc] # Can set arbitrary objects
@property
def geometry(self) -> GeoSeries: ...
@geometry.setter
@@ -283,7 +283,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
def estimate_utm_crs(self, datum_name: str = "WGS 84") -> CRS: ...
# def __getitem__(self, key): ...
# def __setitem__(self, key, value) -> None: ...
def copy(self, deep: bool = True) -> Self: ...
def copy(self, deep: bool = True) -> Self: ... # type: ignore[misc]
# def merge(self, *args, **kwargs) -> GeoDataFrame | pd.DataFrame: ...
def apply( # type: ignore[override]
self,
@@ -298,7 +298,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
engine_kwargs: dict[str, bool] | None = None,
**kwargs,
) -> pd.DataFrame | pd.Series[Incomplete]: ...
def __finalize__(self, other, method: str | None = None, **kwargs) -> Self: ...
def __finalize__(self, other, method: str | None = None, **kwargs) -> Self: ... # type: ignore[misc]
def dissolve(
self,
by: GroupByObject | None = None,
+3 -3
View File
@@ -43,8 +43,8 @@ class GeoSeries(GeoPandasBase, pd.Series[BaseGeometry]): # type: ignore[type-va
copy: bool | None = None,
fastpath: bool = False,
) -> None: ...
@final
def copy(self, deep: bool = True) -> Self: ... # to override pandas definition
@final # type: ignore[misc]
def copy(self, deep: bool = True) -> Self: ...
@property
def values(self) -> GeometryArray: ...
@property
@@ -156,7 +156,7 @@ class GeoSeries(GeoPandasBase, pd.Series[BaseGeometry]): # type: ignore[type-va
def notnull(self) -> pd.Series[bool]: ...
# *** TODO: `fillna` annotation in pandas-stubs is NOT compatible; must `-> Self` ***
# def fillna(self, value=None, method: FillnaOptions | None = None, inplace: bool = False, **kwargs): ...
def __contains__(self, other: object) -> bool: ...
def __contains__(self, other: object) -> bool: ... # type: ignore[misc]
@doc(plot_series)
def plot(self, *args, **kwargs): ... # type: ignore[override] # signature of `plot_series` copied in `@doc`
@doc(_explore_geoseries) # pyright: ignore[reportUnknownArgumentType]