Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 014818d

Browse files
authored
[geopandas] Some @Final methods are overridden (#14657)
1 parent ff32af2 commit 014818d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

stubs/geopandas/geopandas/geodataframe.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
6868
geometry: _GeomCol | None = None,
6969
crs: _ConvertibleToCRS | None = None,
7070
) -> None: ...
71-
def __setattr__(self, attr: str, val: Any) -> None: ... # Can set arbitrary objects
71+
def __setattr__(self, attr: str, val: Any) -> None: ... # type: ignore[misc] # Can set arbitrary objects
7272
@property
7373
def geometry(self) -> GeoSeries: ...
7474
@geometry.setter
@@ -283,7 +283,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
283283
def estimate_utm_crs(self, datum_name: str = "WGS 84") -> CRS: ...
284284
# def __getitem__(self, key): ...
285285
# def __setitem__(self, key, value) -> None: ...
286-
def copy(self, deep: bool = True) -> Self: ...
286+
def copy(self, deep: bool = True) -> Self: ... # type: ignore[misc]
287287
# def merge(self, *args, **kwargs) -> GeoDataFrame | pd.DataFrame: ...
288288
def apply( # type: ignore[override]
289289
self,
@@ -298,7 +298,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
298298
engine_kwargs: dict[str, bool] | None = None,
299299
**kwargs,
300300
) -> pd.DataFrame | pd.Series[Incomplete]: ...
301-
def __finalize__(self, other, method: str | None = None, **kwargs) -> Self: ...
301+
def __finalize__(self, other, method: str | None = None, **kwargs) -> Self: ... # type: ignore[misc]
302302
def dissolve(
303303
self,
304304
by: GroupByObject | None = None,

stubs/geopandas/geopandas/geoseries.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ class GeoSeries(GeoPandasBase, pd.Series[BaseGeometry]): # type: ignore[type-va
4343
copy: bool | None = None,
4444
fastpath: bool = False,
4545
) -> None: ...
46-
@final
47-
def copy(self, deep: bool = True) -> Self: ... # to override pandas definition
46+
@final # type: ignore[misc]
47+
def copy(self, deep: bool = True) -> Self: ...
4848
@property
4949
def values(self) -> GeometryArray: ...
5050
@property
@@ -156,7 +156,7 @@ class GeoSeries(GeoPandasBase, pd.Series[BaseGeometry]): # type: ignore[type-va
156156
def notnull(self) -> pd.Series[bool]: ...
157157
# *** TODO: `fillna` annotation in pandas-stubs is NOT compatible; must `-> Self` ***
158158
# def fillna(self, value=None, method: FillnaOptions | None = None, inplace: bool = False, **kwargs): ...
159-
def __contains__(self, other: object) -> bool: ...
159+
def __contains__(self, other: object) -> bool: ... # type: ignore[misc]
160160
@doc(plot_series)
161161
def plot(self, *args, **kwargs): ... # type: ignore[override] # signature of `plot_series` copied in `@doc`
162162
@doc(_explore_geoseries) # pyright: ignore[reportUnknownArgumentType]

0 commit comments

Comments
 (0)