typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

mypy CI fails with `geopandas` error

Open sobolevn opened this issue 8 months ago • 0 comments

Link: https://github.com/python/typeshed/actions/runs/15279387776/job/42974250437

 testing geopandas (25 files)... failure (exit code 1)

stubs/geopandas/geopandas/geoseries.pyi:152: error: Cannot override final attribute "take" (previously declared in base class "NDFrame")  [misc]
stubs/geopandas/geopandas/geoseries.pyi:152: error: Argument 2 of "take" is incompatible with supertype "NDFrame"; supertype defines the argument type as "Literal['index', 0] | Literal['columns', 1]"  [override]
stubs/geopandas/geopandas/geoseries.pyi:152: note: This violates the Liskov substitution principle
stubs/geopandas/geopandas/geoseries.pyi:152: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#incompatible-overrides

I will try to fix it.

sobolevn avatar May 27 '25 17:05 sobolevn