apache / apache/sedona

Mypy: Static Typing for Python - pre-commit hook run

Open
#1,700 1 comment 0 reactions 0 assignees View on GitHub
python
Dominant language
Java
Stars
2.4k
Forks
784
Avg merge
1d 12h
Merged PRs (30d)
58

Description

Just ran the mypy hook and got a big list of results which so far I am not all sure about.

I know that Apache Airflow runs the mypy pre-commit hook.

https://github.com/apache/airflow/blob/5a68bca9b0378901bd5e6169dd776881feade5db/.pre-commit-config.yaml#L1286

https://www.mypy-lang.org/

https://github.com/python/mypy

https://github.com/pre-commit/mirrors-mypy

```
mypy.....................................................................Failed
- hook id: mypy
- exit code: 1

python/sedona/utils/abstract_parser.py:32: error: Name "BinaryBuffer" is not defined [name-defined]
python/sedona/utils/abstract_parser.py:36: error: Name "BinaryParser" is not defined [name-defined]
python/sedona/core/utils.py:20: error: Need type annotation for "_imported_libs" (hint: "_imported_libs: list[] = ...") [var-annotated]
python/sedona/core/enums/spatial.py:35: error: Incompatible return value type (got "str", expected "SpatialType") [return-value]
python/sedona/utils/geometry_serde_general.py:220: error: Argument 1 to "GeometryBuffer" has incompatible type "bytes"; expected "bytearray" [arg-type]
python/sedona/utils/geometry_serde_general.py:259: error: Too few arguments for "pack_into" [call-arg]
python/sedona/utils/geometry_serde_general.py:260: error: Too many arguments for "unpack_format" of "CoordinateType" [call-arg]
python/sedona/utils/geometry_serde_general.py:269: error: Too few arguments for "pack_into" [call-arg]
python/sedona/utils/geometry_serde_general.py:269: error: Too many arguments for "unpack_format" of "CoordinateType" [call-arg]
python/sedona/utils/geometry_serde_general.py:310: error: Incompatible types in assignment (expression has type "tuple[Any, ...]", variable has type "list[tuple[Any, ...]]") [assignment]
python/sedona/utils/geometry_serde_general.py:521: error: Argument 1 to "len" has incompatible type "bytes | bytearray | None"; expected "Sized" [arg-type]
python/sedona/utils/geometry_serde_general.py:527: error: Argument 1 to "len" has incompatible type "bytes | bytearray | None"; expected "Sized" [arg-type]
python/sedona/utils/geometry_serde_general.py:527: error: Incompatible types in assignment (expression has type "bytes | bytearray | None", target has type "Iterable[SupportsIndex] | bytes") [assignment]
python/sedona/utils/geometry_serde_general.py:528: error: Argument 1 to "len" has incompatible type "bytes | bytearray | None"; expected "Sized" [arg-type]
python/sedona/utils/geometry_serde_general.py:561: error: "None" object is not iterable [misc]
python/sedona/utils/binary_parser.py:97: error: Too few arguments for "UnicodeEncodeError" [call-arg]
python/sedona/core/geom/shapely2/envelope.py:29: error: Need type annotation for "__slots__" (hint: "__slots__: list[] = ...") [var-annotated]
python/sedona/core/enums/grid_type.py:36: error: Incompatible return value type (got "str", expected "GridType") [return-value]
python/sedona/utils/meta.py:25: error: Module "typing" has no attribute "GenericMeta" [attr-defined]
python/sedona/utils/meta.py:28: error: Name "GenericMeta" already defined (possibly by an import) [no-redef]
python/sedona/sql/dataframe_api.py:35: error: Name "ConnectColumn" already defined (possibly by an import) [no-redef]
python/sedona/sql/dataframe_api.py:74: error: Argument 2 to "call_sedona_function_connect" has incompatible type "Iterable[Any]"; expected "list[Any]" [arg-type]
python/sedona/sql/dataframe_api.py:98: error: Module has no attribute "_GenericAlias" [attr-defined]
python/sedona/sql/dataframe_api.py:125: error: Module has no attribute "_GenericAlias" [attr-defined]
python/sedona/sql/dataframe_api.py:141: error: Incompatible return value type (got "BoundArguments", expected "Mapping[str, Any]") [return-value]
python/sedona/sql/dataframe_api.py:157: error: "Mapping[str, Any]" has no attribute "arguments" [attr-defined]
python/sedona/sql/dataframe_api.py:189: error: Argument 2 to "_check_bound_arguments" has incompatible type "dict[str, Any]"; expected "list[type[Any]]" [arg-type]
python/sedona/utils/geometry_serde.py:132: error: Incompatible import of "deserialize" (imported name has type "Callable[[bytes], Any | None]", local name has type "Callable[[bytearray], Any | None]") [assignment]
python/sedona/utils/geometry_serde.py:138: error: Incompatible import of "deserialize" (imported name has type "Callable[[bytes], Any | None]", local name has type "Callable[[bytearray], Any | None]") [assignment]
python/sedona/sql/st_functions.py:303: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float | int, Any | Any | str | bool | None]", variable has type "tuple[Any | Any | str, Any | Any | str | float | int]") [assignment]
python/sedona/sql/st_functions.py:305: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float | int, Any | Any | str | bool | None, Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str | float | int]") [assignment]
python/sedona/sql/st_functions.py:582: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float]", variable has type "tuple[Any | Any | str, Any | Any | str | float, Any | Any | str | float | None]") [assignment]
python/sedona/sql/st_functions.py:584: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float, Any | Any | str | float | None, Any | str | float]", variable has type "tuple[Any | Any | str, Any | Any | str | float, Any | Any | str | float | None]") [assignment]
python/sedona/sql/st_functions.py:644: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | int, Any | str | int]", variable has type "tuple[Any | Any | str, Any | Any | str | int]") [assignment]
python/sedona/sql/st_functions.py:1191: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str | bool | None, Any | Any | str | bool | None]") [assignment]
python/sedona/sql/st_functions.py:1193: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | str | bool]", variable has type "tuple[Any | Any | str, Any | Any | str | bool | None, Any | Any | str | bool | None]") [assignment]
python/sedona/sql/st_functions.py:1252: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float, Any | Any | str | float]", variable has type "tuple[Any | Any | str, Any | Any | str | float, Any | Any | str | float, Any | Any | str | bool | None]") [assignment]
python/sedona/sql/st_functions.py:1525: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str | float | None]") [assignment]
python/sedona/sql/st_functions.py:1822: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str, Any | Any | str | str | None]") [assignment]
python/sedona/sql/st_functions.py:1824: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str, Any | Any | str | str | None, Any | str | bool]", variable has type "tuple[Any | Any | str, Any | Any | str, Any | Any | str | str | None]") [assignment]
python/sedona/sql/st_functions.py:2197: error: Incompatible types in assignment (expression has type tuple[Any | Any | str, Any | Any | str | float, ... <11 more items>], variable has type tuple[Any | Any | str, Any | Any | str | float, Any | Any | str | float, Any | Any | str | float, Any | Any | str | float, Any | Any | str | float, Any | Any | str | float]) [assignment]
python/sedona/sql/st_functions.py:2238: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str, Any | str, Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str]") [assignment]
python/sedona/sql/st_functions.py:2240: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str, Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str]") [assignment]
python/sedona/sql/st_functions.py:2355: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str]", variable has type "tuple[Any | Any | str, Any | Any | str, Any | str]") [assignment]
python/sedona/sql/st_functions.py:2413: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float, Any | str | float, Any | str | float]", variable has type "tuple[Any | Any | str, Any | Any | str | float, Any | str]") [assignment]
python/sedona/sql/st_functions.py:2415: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str, Any | Any | str | float]", variable has type "tuple[Any | Any | str, Any | Any | str | float, Any | str]") [assignment]
python/sedona/sql/st_constructors.py:414: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str | float | int, Any | Any | str | float | int, Any | str | float | int]", variable has type "tuple[Any | Any | str | float | int, Any | Any | str | float | int]") [assignment]
python/sedona/sql/st_constructors.py:416: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str | float | int, Any | Any | str | float | int, Any | str | float | int]", variable has type "tuple[Any | Any | str | float | int, Any | Any | str | float | int]") [assignment]
python/sedona/sql/st_constructors.py:445: error: Incompatible types in assignment (expression has type "tuple[Any | Any | str | float | int, Any | Any | str | float | int, Any | Any | str | float | int, Any | Any | str | float | int]", variable has type "tuple[Any | Any | str | float | int, Any | Any | str | float | int, Any | Any | str | float | int, Any | Any | str | float | int, Any | Any | str | float | int | None]") [assignment]
python/sedona/core/geom/shapely2/circle.py:36: error: Need type annotation for "__slots__" (hint: "__slots__: list[] = ...") [var-annotated]
python/sedona/core/geom/shapely1/circle.py:40: error: Cannot determine type of "centerPoint" [has-type]
python/tests/utils/test_geomserde_speedup.py:154: error: "None" object is not iterable [misc]
python/sedona/sql/types.py:32: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
python/sedona/sql/types.py:33: error: Cannot assign to a type [misc]
python/sedona/sql/types.py:33: error: Incompatible types in assignment (expression has type "None", variable has type "type[SedonaRaster]") [assignment]
python/sedona/sql/types.py:93: error: "type[SedonaRaster]" has no attribute "__UDT__" [attr-defined]
python/sedona/utils/spatial_rdd_parser.py:105: error: Name "BinaryBuffer" is not defined [name-defined]
python/sedona/utils/spatial_rdd_parser.py:106: error: NotImplemented? not callable [misc]
python/sedona/utils/spatial_rdd_parser.py:115: error: "type[object]" has no attribute "geometry_from_bytes" [attr-defined]
python/sedona/utils/spatial_rdd_parser.py:135: error: Name "BinaryBuffer" is not defined [name-defined]
python/sedona/utils/spatial_rdd_parser.py:151: error: Name "BinaryBuffer" is not defined [name-defined]
python/sedona/utils/spatial_rdd_parser.py:178: error: Name "BinaryBuffer" is not defined [name-defined]
python/sedona/utils/prep.py:47: error: Invalid type comment or annotation [valid-type]
python/sedona/utils/prep.py:47: note: Suggestion: use type[...] instead of type(...)
python/sedona/utils/prep.py:55: error: Missing return statement [return]
python/sedona/utils/prep.py:55: error: Invalid type comment or annotation [valid-type]
python/sedona/utils/prep.py:55: note: Suggestion: use type[...] instead of type(...)
python/sedona/core/SpatialRDD/spatial_rdd.py:52: error: Too many arguments for "SpatialPartitioner" [call-arg]
python/sedona/core/SpatialRDD/spatial_rdd.py:66: error: Too many arguments for "JvmStorageLevel" [call-arg]
python/sedona/core/SpatialRDD/spatial_rdd.py:171: error: Too many arguments for "IndexTypeJvm" [call-arg]
python/sedona/core/SpatialRDD/spatial_rdd.py:173: error: Too many arguments for "IndexTypeJvm" [call-arg]
python/sedona/core/SpatialRDD/spatial_rdd.py:291: error: Unexpected keyword argument "jgrid" for "JvmGrids" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmGrids" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:291: error: Unexpected keyword argument "sc" for "JvmGrids" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmGrids" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:291: error: Unexpected keyword argument "jgrid" for "JvmGrids" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmGrids" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:291: error: Unexpected keyword argument "sc" for "JvmGrids" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmGrids" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:431: error: Too many arguments for "GridTypeJvm" [call-arg]
python/sedona/core/SpatialRDD/spatial_rdd.py:433: error: Too many arguments for "GridTypeJvm" [call-arg]
python/sedona/core/SpatialRDD/spatial_rdd.py:460: error: Unexpected keyword argument "jsrdd" for "JvmSpatialRDD" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmSpatialRDD" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:460: error: Unexpected keyword argument "sc" for "JvmSpatialRDD" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmSpatialRDD" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:460: error: Unexpected keyword argument "tp" for "JvmSpatialRDD" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmSpatialRDD" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:483: error: Unexpected keyword argument "jsrdd" for "JvmSpatialRDD" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmSpatialRDD" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:483: error: Unexpected keyword argument "sc" for "JvmSpatialRDD" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmSpatialRDD" defined here
python/sedona/core/SpatialRDD/spatial_rdd.py:483: error: Unexpected keyword argument "tp" for "JvmSpatialRDD" [call-arg]
/home/abe/.cache/pre-commit/repouabu7jen/py_env-python3/lib/python3.10/site-packages/mypy/typeshed/stdlib/builtins.pyi:106: note: "JvmSpatialRDD" defined here
python/sedona/utils/adapter.py:44: error: Name "JvmSpatialRDD" is not defined [name-defined]
python/sedona/utils/adapter.py:52: error: Too many arguments for "JvmSpatialRDD" [call-arg]
python/sedona/utils/adapter.py:72: error: Name "toSpatialRdd" already defined on line 54 [no-redef]
python/sedona/utils/adapter.py:117: error: Name "toDf" already defined on line 95 [no-redef]
python/sedona/utils/adapter.py:134: error: Name "toDf" already defined on line 95 [no-redef]
python/sedona/utils/adapter.py:153: error: Name "toDf" already defined on line 95 [no-redef]
python/sedona/utils/adapter.py:178: error: Name "toDf" already defined on line 95 [no-redef]
python/sedona/utils/adapter.py:185: error: Name "toDf" already defined on line 95 [no-redef]
python/sedona/utils/adapter.py:203: error: Name "toDf" already defined on line 95 [no-redef]
python/sedona/core/spatialOperator/knn_query.py:64: error: Too many arguments for "BinaryParser" [call-arg]
python/sedona/core/formatMapper/wkt_reader.py:58: error: Name "readToGeometryRDD" already defined on line 27 [no-redef]
python/sedona/core/formatMapper/geo_json_reader.py:41: error: Name "readToGeometryRDD" already defined on line 27 [no-redef]
python/sedona/core/formatMapper/geo_json_reader.py:69: error: Name "readToGeometryRDD" already defined on line 27 [no-redef]
python/sedona/core/formatMapper/geo_json_reader.py:85: error: Name "readToGeometryRDD" already defined on line 27 [no-redef]
python/sedona/core/SpatialRDD/rectangle_rdd.py:33: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/rectangle_rdd.py:42: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/rectangle_rdd.py:61: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/rectangle_rdd.py:72: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/rectangle_rdd.py:89: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/rectangle_rdd.py:95: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/rectangle_rdd.py:113: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/rectangle_rdd.py:123: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/rectangle_rdd.py:139: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/point_rdd.py:43: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/point_rdd.py:47: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/point_rdd.py:56: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/point_rdd.py:76: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/point_rdd.py:86: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/point_rdd.py:103: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/point_rdd.py:108: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/point_rdd.py:125: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/point_rdd.py:130: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/point_rdd.py:146: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/polygon_rdd.py:37: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/polygon_rdd.py:41: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/polygon_rdd.py:50: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/polygon_rdd.py:71: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/polygon_rdd.py:83: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/polygon_rdd.py:102: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/polygon_rdd.py:113: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/polygon_rdd.py:131: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/polygon_rdd.py:141: error: Name "__init__" already defined on line 29 [no-redef]
python/sedona/core/SpatialRDD/polygon_rdd.py:157: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/linestring_rdd.py:40: error: Name "__init__" already defined on line 30 [no-redef]
python/sedona/core/SpatialRDD/linestring_rdd.py:44: error: Name "__init__" already defined on line 30 [no-redef]
python/sedona/core/SpatialRDD/linestring_rdd.py:53: error: Name "__init__" already defined on line 30 [no-redef]
python/sedona/core/SpatialRDD/linestring_rdd.py:75: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/linestring_rdd.py:86: error: Name "__init__" already defined on line 30 [no-redef]
python/sedona/core/SpatialRDD/linestring_rdd.py:106: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/linestring_rdd.py:116: error: Name "__init__" already defined on line 30 [no-redef]
python/sedona/core/SpatialRDD/linestring_rdd.py:134: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/linestring_rdd.py:139: error: Name "__init__" already defined on line 30 [no-redef]
python/sedona/core/SpatialRDD/linestring_rdd.py:155: error: Too many arguments for "FileSplitterJvm" [call-arg]
python/sedona/core/SpatialRDD/circle_rdd.py:34: error: Name "PointRDD" is not defined [name-defined]
python/sedona/core/SpatialRDD/circle_rdd.py:38: error: Missing positional argument "rdd" in call to "PointRDD" [call-arg]
python/sedona/core/SpatialRDD/circle_rdd.py:42: error: Name "PolygonRDD" is not defined [name-defined]
python/sedona/core/SpatialRDD/circle_rdd.py:46: error: Missing positional argument "rdd" in call to "PolygonRDD" [call-arg]
python/sedona/core/SpatialRDD/circle_rdd.py:50: error: Name "LineStringRDD" is not defined [name-defined]
python/sedona/core/SpatialRDD/circle_rdd.py:54: error: Missing positional argument "rdd" in call to "LineStringRDD" [call-arg]
python/sedona/core/SpatialRDD/circle_rdd.py:58: error: Name "RectangleRDD" is not defined [name-defined]
python/sedona/core/formatMapper/wkb_reader.py:57: error: Name "readToGeometryRDD" already defined on line 27 [no-redef]
python/sedona/core/formatMapper/shapefileParser/shape_file_reader.py:57: error: Missing positional argument "rdd" in call to "PolygonRDD" [call-arg]
python/sedona/core/formatMapper/shapefileParser/shape_file_reader.py:72: error: Missing positional argument "rdd" in call to "PointRDD" [call-arg]
python/sedona/core/formatMapper/shapefileParser/shape_file_reader.py:87: error: Missing positional argument "rdd" in call to "LineStringRDD" [call-arg]
python/sedona/core/formatMapper/disc_utils.py:49: error: Missing positional argument "rdd" in call to "PolygonRDD" [call-arg]
python/sedona/core/formatMapper/disc_utils.py:61: error: Missing positional argument "rdd" in call to "PointRDD" [call-arg]
python/sedona/core/formatMapper/disc_utils.py:73: error: Missing positional argument "rdd" in call to "LineStringRDD" [call-arg]
python/tests/test_base.py:79: error: Argument 1 to "len" has incompatible type "Iterable[float]"; expected "Sized" [arg-type]
python/tests/test_base.py:79: error: Argument 1 to "len" has incompatible type "Iterable[float] | float"; expected "Sized" [arg-type]
python/tests/test_base.py:80: error: Argument 1 to "len" has incompatible type "Iterable[float]"; expected "Sized" [arg-type]
python/tests/test_base.py:81: error: Value of type "Iterable[float]" is not indexable [index]
python/tests/test_base.py:81: error: Value of type "Iterable[float] | float" is not indexable [index]
python/tests/sql/test_function.py:150: error: Name "test_st_bestsrid" already defined on line 127 [no-redef]
python/tests/sql/test_function.py:600: error: Name "test_st_difference_right_not_overlaps_left" already defined on line 581 [no-redef]
Found 155 errors in 33 files (checked 194 source files)
```

## Settings

Sedona version = ?

Apache Spark version = ?

Apache Flink version = ?

API type = Scala, Java, Python?

Scala version = 2.11, 2.12, 2.13?

JRE version = 1.8, 1.11?

Python version = ?

Environment = Standalone, AWS EC2, EMR, Azure, Databricks?

Contributor guide

Open the contributing guide

Research direction

Run the mypy pre-commit hook and review the reported files, including python/sedona/utils/abstract_parser.py, python/sedona/utils/geometry_serde_general.py, and python/sedona/sql/st_functions.py. Trace each reported typing error and verify that the hook completes without errors across the listed Python sources.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.