From 500cb792fccd4c9e88efaed94d19624ce864651c Mon Sep 17 00:00:00 2001 From: Ali Hamdan Date: Sat, 30 May 2026 11:46:59 +0200 Subject: [PATCH] Add ty --- .github/workflows/tests.yml | 14 +++++ pyproject.toml | 6 +++ run.py | 1 + stubs/pandapower-stubs/auxiliary.pyi | 2 +- .../plotting/plotly/draw_layers.pyi | 2 +- .../plotting/plotly/layers_plotly.pyi | 2 +- .../plotting/plotly/pf_res_plotly.pyi | 2 +- .../plotting/plotly/simple_plotly.pyi | 2 +- .../plotting/plotly/traces.pyi | 2 +- .../plotting/plotly/vlevel_plotly.pyi | 2 +- .../topology/graph_tool_interface.pyi | 4 +- stubs/psqlextra-stubs/error.pyi | 4 +- tests/geopandas/test_explore.py | 8 +-- tests/geopandas/test_geodataframe.py | 30 +++++------ tests/geopandas/test_geoseries.py | 18 +++---- tests/geopandas/test_io.py | 2 +- tests/shapely/test_affinity.py | 6 +-- tests/shapely/test_constructive.py | 4 +- tests/shapely/test_coordinates.py | 10 ++-- tests/shapely/test_creation.py | 14 ++--- tests/shapely/test_geometry.py | 54 +++++++++---------- tests/shapely/test_io.py | 6 +-- tests/shapely/test_linear.py | 12 ++--- tests/shapely/test_ops.py | 11 ++-- tests/shapely/test_strtree.py | 10 ++-- uv.lock | 27 ++++++++++ 26 files changed, 155 insertions(+), 100 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6ddabad..8332b4f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -95,3 +95,17 @@ jobs: - name: Install dependencies run: uv sync --frozen - run: uv run python run.py pyright + ty: + name: Run ty on the tests and on the stubs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - name: Set up Python ${{ env.UV_PYTHON }} + uses: actions/setup-python@v6 + with: + python-version: ${{ env.UV_PYTHON }} + - name: Install uv + uses: astral-sh/setup-uv@v7 + - name: Install dependencies + run: uv sync --frozen + - run: uv run python run.py ty-check diff --git a/pyproject.toml b/pyproject.toml index 3862b38..3c2ef6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,6 +31,7 @@ dev = [ "rich-argparse>=1.8.0", "mypy[native-parser]>=2.1.0", "pyright>=1.1.409", + "ty>=0.0.40", { include-group = "tests" }, ] @@ -121,5 +122,10 @@ reportIncompatibleVariableOverride = "none" reportPropertyTypeMismatch = "none" reportSelfClsParameterName = "none" +[tool.ty] +analysis.respect-type-ignore-comments = false +rules.invalid-method-override = "ignore" # out of control of the stubs (inherited from implementation) +terminal.output-format = "concise" + [tool.pytest.ini_options] testpaths = ["tests"] diff --git a/run.py b/run.py index 057dfe5..9223fae 100755 --- a/run.py +++ b/run.py @@ -15,6 +15,7 @@ "ruff-format": ["tests", "stubs"], "mypy": ["tests", "stubs"], "pyright": ["tests", "stubs"], + "ty-check": ["tests", "stubs"], "stubtest": ["--allowlist=stubtest_allowlist.txt", "pandapower", "pyogrio"], "pytest": [], } diff --git a/stubs/pandapower-stubs/auxiliary.pyi b/stubs/pandapower-stubs/auxiliary.pyi index 1d30608..1afe665 100644 --- a/stubs/pandapower-stubs/auxiliary.pyi +++ b/stubs/pandapower-stubs/auxiliary.pyi @@ -131,7 +131,7 @@ class GeoAccessor: @property def type(self) -> str: ... @property - def as_shapely_obj(self) -> pd.Series[BaseGeometry]: ... # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments] + def as_shapely_obj(self) -> pd.Series[BaseGeometry]: ... # type: ignore[type-var] # pyright: ignore[reportInvalidTypeArguments] # ty:ignore[invalid-type-arguments] @property def as_geoseries(self) -> gpd.GeoSeries: ... def __getattr__(self, item: str) -> Any: ... diff --git a/stubs/pandapower-stubs/plotting/plotly/draw_layers.pyi b/stubs/pandapower-stubs/plotting/plotly/draw_layers.pyi index 2af00a2..461a05c 100644 --- a/stubs/pandapower-stubs/plotting/plotly/draw_layers.pyi +++ b/stubs/pandapower-stubs/plotting/plotly/draw_layers.pyi @@ -2,7 +2,7 @@ from collections.abc import Sequence from pathlib import Path from typing import Any, Literal -import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] def version_check() -> None: ... def draw_layers( diff --git a/stubs/pandapower-stubs/plotting/plotly/layers_plotly.pyi b/stubs/pandapower-stubs/plotting/plotly/layers_plotly.pyi index ec6d845..e581712 100644 --- a/stubs/pandapower-stubs/plotting/plotly/layers_plotly.pyi +++ b/stubs/pandapower-stubs/plotting/plotly/layers_plotly.pyi @@ -1,7 +1,7 @@ from _typeshed import SupportsGetItem from typing import Literal -import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] from pandapower.auxiliary import pandapowerNet diff --git a/stubs/pandapower-stubs/plotting/plotly/pf_res_plotly.pyi b/stubs/pandapower-stubs/plotting/plotly/pf_res_plotly.pyi index 8e557b5..0b15962 100644 --- a/stubs/pandapower-stubs/plotting/plotly/pf_res_plotly.pyi +++ b/stubs/pandapower-stubs/plotting/plotly/pf_res_plotly.pyi @@ -1,6 +1,6 @@ from typing import Literal -import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] from pandapower.auxiliary import pandapowerNet from pandapower.plotting.plotly.mapbox_plot import * diff --git a/stubs/pandapower-stubs/plotting/plotly/simple_plotly.pyi b/stubs/pandapower-stubs/plotting/plotly/simple_plotly.pyi index 9e71517..850afb7 100644 --- a/stubs/pandapower-stubs/plotting/plotly/simple_plotly.pyi +++ b/stubs/pandapower-stubs/plotting/plotly/simple_plotly.pyi @@ -2,7 +2,7 @@ from collections.abc import Iterable, Mapping from typing import Any, Literal, overload import pandas as pd -import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] from pandapower.auxiliary import pandapowerNet from pandapower.plotting.plotly.mapbox_plot import * diff --git a/stubs/pandapower-stubs/plotting/plotly/traces.pyi b/stubs/pandapower-stubs/plotting/plotly/traces.pyi index 3040f4a..d65dc79 100644 --- a/stubs/pandapower-stubs/plotting/plotly/traces.pyi +++ b/stubs/pandapower-stubs/plotting/plotly/traces.pyi @@ -3,7 +3,7 @@ from collections.abc import Collection, Iterable, Mapping from typing import Any, Literal import pandas as pd -import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] from pandapower._typing import Float, Int from pandapower.auxiliary import pandapowerNet diff --git a/stubs/pandapower-stubs/plotting/plotly/vlevel_plotly.pyi b/stubs/pandapower-stubs/plotting/plotly/vlevel_plotly.pyi index 3a163a9..7e7b9f9 100644 --- a/stubs/pandapower-stubs/plotting/plotly/vlevel_plotly.pyi +++ b/stubs/pandapower-stubs/plotting/plotly/vlevel_plotly.pyi @@ -1,6 +1,6 @@ from typing import Literal -import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +import plotly.graph_objs as go # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] from pandapower.auxiliary import pandapowerNet from pandapower.plotting.plotly.traces import _MapStyle diff --git a/stubs/pandapower-stubs/topology/graph_tool_interface.pyi b/stubs/pandapower-stubs/topology/graph_tool_interface.pyi index 2a31885..4c10cee 100644 --- a/stubs/pandapower-stubs/topology/graph_tool_interface.pyi +++ b/stubs/pandapower-stubs/topology/graph_tool_interface.pyi @@ -2,7 +2,9 @@ from _typeshed import Incomplete from collections.abc import Iterable from typing import Literal -from graph_tool import Graph # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +from graph_tool import ( # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] + Graph, +) class GraphToolInterface(Graph): # type: ignore[misc] # pyright: ignore[reportUntypedBaseClass] pp_buses: set[int] diff --git a/stubs/psqlextra-stubs/error.pyi b/stubs/psqlextra-stubs/error.pyi index f13c0a0..58d869e 100644 --- a/stubs/psqlextra-stubs/error.pyi +++ b/stubs/psqlextra-stubs/error.pyi @@ -1,5 +1,7 @@ from django import db -from psycopg import Error as _Psycopg3Error # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] +from psycopg import ( # type: ignore[import-not-found] # pyright: ignore[reportMissingImports] # ty:ignore[unresolved-import] + Error as _Psycopg3Error, +) from psycopg2 import Error as _Psycopg2Error Psycopg2Error: type[_Psycopg2Error] | None diff --git a/tests/geopandas/test_explore.py b/tests/geopandas/test_explore.py index 1991bae..34d597b 100644 --- a/tests/geopandas/test_explore.py +++ b/tests/geopandas/test_explore.py @@ -14,8 +14,8 @@ def test_explore() -> None: if TYPE_CHECKING: assert_type(GDF.explore(tooltip=False, popup=True, k=4, map_kwds={}), folium.Map) assert_type(_explore(GDF, tooltip=False, popup=True, k=4, map_kwds={}), folium.Map) - GDF.explore(map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] - _explore(GDF, map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + GDF.explore(map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] + _explore(GDF, map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_geoseries_explore() -> None: @@ -27,5 +27,5 @@ def test_geoseries_explore() -> None: _explore_geoseries(GDF.geometry, highlight=False, control_scale=False, map_kwds={}), folium.Map, ) - GDF.geometry.explore(map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] - _explore_geoseries(GDF.geometry, map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + GDF.geometry.explore(map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] + _explore_geoseries(GDF.geometry, map_kwds=False) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] diff --git a/tests/geopandas/test_geodataframe.py b/tests/geopandas/test_geodataframe.py index 14f7e78..5fdcf20 100644 --- a/tests/geopandas/test_geodataframe.py +++ b/tests/geopandas/test_geodataframe.py @@ -30,9 +30,9 @@ def test_geometry() -> None: gdf.geometry = geo.values gdf.geometry = [Point(1, 2), Point(3, 4)] with pytest.raises(Exception): - gdf.geometry = "geometry" # type: ignore[assignment] # pyright: ignore[reportAttributeAccessIssue] + gdf.geometry = "geometry" # type: ignore[assignment] # pyright: ignore[reportAttributeAccessIssue] # ty:ignore[invalid-assignment] with pytest.raises(Exception): - gdf.geometry = [1, 2] # type: ignore[list-item] # pyright: ignore[reportAttributeAccessIssue] + gdf.geometry = [1, 2] # type: ignore[list-item] # pyright: ignore[reportAttributeAccessIssue] # ty:ignore[invalid-assignment] # set_geometry check(assert_type(gdf.set_geometry(geo), GeoDataFrame), GeoDataFrame) @@ -66,7 +66,7 @@ def test_crs() -> None: gdf.crs = "EPSG:4326" gdf.crs = 4326 with pytest.raises(Exception): - gdf.crs = 1.5 # type: ignore[assignment] # pyright: ignore[reportAttributeAccessIssue] + gdf.crs = 1.5 # type: ignore[assignment] # pyright: ignore[reportAttributeAccessIssue] # ty:ignore[invalid-assignment] # set_crs check(assert_type(gdf.set_crs(crs), GeoDataFrame), GeoDataFrame) @@ -76,11 +76,11 @@ def test_crs() -> None: check(assert_type(gdf.set_crs(crs=4326), GeoDataFrame), GeoDataFrame) check(assert_type(gdf.set_crs(epsg=4326), GeoDataFrame), GeoDataFrame) with pytest.raises(Exception): - gdf.set_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] + gdf.set_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gdf.set_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + gdf.set_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - gdf.set_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gdf.set_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] # to_crs check(assert_type(gdf.to_crs(crs), GeoDataFrame), GeoDataFrame) @@ -90,24 +90,24 @@ def test_crs() -> None: check(assert_type(gdf.to_crs(crs=4326), GeoDataFrame), GeoDataFrame) check(assert_type(gdf.to_crs(epsg=4326), GeoDataFrame), GeoDataFrame) with pytest.raises(Exception): - gdf.to_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] + gdf.to_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gdf.to_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + gdf.to_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - gdf.to_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gdf.to_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gdf.to_crs(inplace=True) # type: ignore[call-overload] # pyright: ignore[reportCallIssue] + gdf.to_crs(inplace=True) # type: ignore[call-overload] # pyright: ignore[reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gdf.to_crs(None, inplace=True) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gdf.to_crs(None, inplace=True) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gdf.to_crs(None, None, inplace=True) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gdf.to_crs(None, None, inplace=True) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gdf.to_crs(None, None, True) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gdf.to_crs(None, None, True) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] # estimate_utm_crs check(assert_type(gdf.estimate_utm_crs(), CRS), CRS) check(assert_type(gdf.estimate_utm_crs("WGS 84"), CRS), CRS) with pytest.raises(Exception): - gdf.estimate_utm_crs(84) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + gdf.estimate_utm_crs(84) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - gdf.estimate_utm_crs(CRS) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + gdf.estimate_utm_crs(CRS) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] diff --git a/tests/geopandas/test_geoseries.py b/tests/geopandas/test_geoseries.py index dba2699..a836f6e 100644 --- a/tests/geopandas/test_geoseries.py +++ b/tests/geopandas/test_geoseries.py @@ -43,7 +43,7 @@ def test_crs() -> None: gs.crs = 4326 assert isinstance(gs.crs, CRS) with pytest.raises(Exception): - gs.crs = 1.5 # type: ignore[assignment] # pyright: ignore[reportAttributeAccessIssue] + gs.crs = 1.5 # type: ignore[assignment] # pyright: ignore[reportAttributeAccessIssue] # ty:ignore[invalid-assignment] # set_crs check(assert_type(gs.set_crs(crs), GeoSeries), GeoSeries) @@ -53,11 +53,11 @@ def test_crs() -> None: check(assert_type(gs.set_crs(crs=4326), GeoSeries), GeoSeries) check(assert_type(gs.set_crs(epsg=4326), GeoSeries), GeoSeries) with pytest.raises(Exception): - gs.set_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] + gs.set_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gs.set_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + gs.set_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - gs.set_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gs.set_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] # to_crs check(assert_type(gs.to_crs(crs), GeoSeries), GeoSeries) @@ -65,16 +65,16 @@ def test_crs() -> None: check(assert_type(gs.to_crs(crs=4326), GeoSeries), GeoSeries) check(assert_type(gs.to_crs(epsg=4326), GeoSeries), GeoSeries) with pytest.raises(Exception): - gs.to_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] + gs.to_crs() # type: ignore[call-overload] # pyright: ignore[reportCallIssue] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - gs.to_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + gs.to_crs(None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - gs.to_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + gs.to_crs(None, None) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] # estimate_utm_crs check(assert_type(gs.estimate_utm_crs(), CRS), CRS) check(assert_type(gs.estimate_utm_crs("WGS 84"), CRS), CRS) with pytest.raises(Exception): - gs.estimate_utm_crs(84) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + gs.estimate_utm_crs(84) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - gs.estimate_utm_crs(CRS) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + gs.estimate_utm_crs(CRS) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] diff --git a/tests/geopandas/test_io.py b/tests/geopandas/test_io.py index 3c8ab07..a257c8f 100644 --- a/tests/geopandas/test_io.py +++ b/tests/geopandas/test_io.py @@ -33,7 +33,7 @@ def test_read_file(tmp_path: Path) -> None: assert not isinstance(df, gpd.GeoDataFrame) with pytest.raises(Exception): - gpd.read_file(file, engine="toto") # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + gpd.read_file(file, engine="toto") # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_infer_schema() -> None: diff --git a/tests/shapely/test_affinity.py b/tests/shapely/test_affinity.py index 2caa5fd..453c1f8 100644 --- a/tests/shapely/test_affinity.py +++ b/tests/shapely/test_affinity.py @@ -57,7 +57,7 @@ def test_rotate() -> None: check(assert_type(shapely.affinity.rotate(LS, 90, origin=(x, y, 0)), LineString), LineString) with pytest.raises(Exception): - shapely.affinity.rotate(LS, 90, origin="centred") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.affinity.rotate(LS, 90, origin="centred") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_scale() -> None: @@ -77,7 +77,7 @@ def test_scale() -> None: check(assert_type(shapely.affinity.scale(LS, 90, origin=(1, 1.0, 0.0)), LineString), LineString) with pytest.raises(Exception): - shapely.affinity.scale(PO, origin="centred") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.affinity.scale(PO, origin="centred") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_skew() -> None: @@ -93,7 +93,7 @@ def test_skew() -> None: check(assert_type(shapely.affinity.skew(PO, 20, origin=(1.0, 2.0, 0)), Polygon), Polygon) with pytest.raises(Exception): - shapely.affinity.skew(PO, 20, origin="centred") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.affinity.skew(PO, 20, origin="centred") # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_translate() -> None: diff --git a/tests/shapely/test_constructive.py b/tests/shapely/test_constructive.py index 549112e..ee762ad 100644 --- a/tests/shapely/test_constructive.py +++ b/tests/shapely/test_constructive.py @@ -316,7 +316,7 @@ def test_polygonize() -> None: dtype=GeometryCollection, ) with pytest.raises(Exception): - shapely.polygonize(LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.polygonize(LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_polygonize_full() -> None: @@ -352,7 +352,7 @@ def test_polygonize_full() -> None: dtype=np.ndarray, ) with pytest.raises(Exception): - shapely.polygonize_full(LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.polygonize_full(LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_remove_repeated_points() -> None: diff --git a/tests/shapely/test_coordinates.py b/tests/shapely/test_coordinates.py index 5c99aca..a300a34 100644 --- a/tests/shapely/test_coordinates.py +++ b/tests/shapely/test_coordinates.py @@ -94,7 +94,7 @@ def test_get_coordinates() -> None: # bool fallback check( assert_type( - shapely.get_coordinates(P, return_index=bool(1)), + shapely.get_coordinates(P, return_index=bool(int("1"))), tuple[NDArray[np.float64], NDArray[np.int64]] | NDArray[np.float64], ), tuple, @@ -102,7 +102,7 @@ def test_get_coordinates() -> None: ) check( assert_type( - shapely.get_coordinates(P, return_index=bool(0)), + shapely.get_coordinates(P, return_index=bool(int("0"))), tuple[NDArray[np.float64], NDArray[np.int64]] | NDArray[np.float64], ), np.ndarray, @@ -129,8 +129,8 @@ def test_set_coordinates() -> None: dtype=Point, ) with pytest.raises(Exception): - shapely.set_coordinates(None, []) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.set_coordinates(None, []) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.set_coordinates(None, [1, 1]) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.set_coordinates(None, [1, 1]) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.set_coordinates(None, [[1, 1]]) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.set_coordinates(None, [[1, 1]]) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] diff --git a/tests/shapely/test_creation.py b/tests/shapely/test_creation.py index 30de066..acda793 100644 --- a/tests/shapely/test_creation.py +++ b/tests/shapely/test_creation.py @@ -73,9 +73,9 @@ def test_points() -> None: # wrong with pytest.raises(Exception): - shapely.points(0) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.points(0) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.points(0, None, 1) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.points(0, None, 1) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): shapely.points(0, 1, indices=[0]) # False negative (difficult to catch) @@ -107,7 +107,7 @@ def test_linestrings() -> None: # wrong with pytest.raises(Exception): - shapely.linestrings(0, 1) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.linestrings(0, 1) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_linearrings() -> None: @@ -149,7 +149,7 @@ def test_linearrings() -> None: # wrong with pytest.raises(Exception): - shapely.linearrings(0, 1) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.linearrings(0, 1) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_polygons() -> None: @@ -473,11 +473,11 @@ def test_destroy_prepared() -> None: # despite its name, this function doesn't accept PreparedGeometry with pytest.raises(Exception): - shapely.destroy_prepared(PreparedGeometry(P)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.destroy_prepared(PreparedGeometry(P)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - shapely.destroy_prepared([PreparedGeometry(P)]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.destroy_prepared([PreparedGeometry(P)]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): - shapely.destroy_prepared((PreparedGeometry(P), None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.destroy_prepared((PreparedGeometry(P), None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_empty() -> None: diff --git a/tests/shapely/test_geometry.py b/tests/shapely/test_geometry.py index d9d5632..7275ab8 100644 --- a/tests/shapely/test_geometry.py +++ b/tests/shapely/test_geometry.py @@ -262,9 +262,9 @@ def test_point() -> None: Point(float(i) for i in range(2)) with pytest.raises(TypeError): - Point(1) # type: ignore # pyright: ignore + Point(1) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - Point(1, 2, 3, 4) # type: ignore # pyright: ignore + Point(1, 2, 3, 4) # type: ignore # pyright: ignore # ty:ignore[no-matching-overload] # Test new attributes check(assert_type(P.x, float), float) @@ -291,11 +291,11 @@ def test_linestring() -> None: LineString(HasArray(np.array([[1, 2], [3, 4]]))) with pytest.raises(TypeError): - LineString(1) # type: ignore # pyright: ignore + LineString(1) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - LineString(P) # type: ignore # pyright: ignore + LineString(P) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - LineString([P, LS]) # type: ignore # pyright: ignore + LineString([P, LS]) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] # Test new attributes check(assert_type(LS.offset_curve(1.5), LineString | MultiLineString), LineString) @@ -322,11 +322,11 @@ def test_linearring() -> None: LinearRing(HasArray(np.array(coords))) with pytest.raises(TypeError): - LinearRing(1) # type: ignore # pyright: ignore + LinearRing(1) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - LinearRing(P) # type: ignore # pyright: ignore + LinearRing(P) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - LinearRing([P, LR]) # type: ignore # pyright: ignore + LinearRing([P, LR]) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] # Test new attributes check(assert_type(LR.offset_curve(1.5), LineString | MultiLineString), LineString) @@ -352,9 +352,9 @@ def test_polygon() -> None: Polygon(np.array(coords)) with pytest.raises(TypeError): - Polygon(1.0, 2) # type: ignore # pyright: ignore + Polygon(1.0, 2) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - Polygon(1, 2, 3, 4) # type: ignore # pyright: ignore + Polygon(1, 2, 3, 4) # type: ignore # pyright: ignore # ty:ignore[invalid-argument-type, too-many-positional-arguments] # Test new attributes check(assert_type(PO.exterior, LinearRing), LinearRing) @@ -382,15 +382,15 @@ def test_multipoint() -> None: t: tuple[Point | tuple[float, float] | list[float], ...] = (P, (1, 2), [1, 2]) MultiPoint(t) with pytest.raises(TypeError): - MultiPoint(o for o in [LS, LS, LS]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPoint(o for o in [LS, LS, LS]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPoint(BG) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPoint(BG) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPoint((PO,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPoint((PO,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPoint((None,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPoint((None,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPoint((P, PO, None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPoint((P, PO, None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] # Test BaseGeometry overrides check(assert_type(MP.boundary, GeometryCollection), GeometryCollection) @@ -405,15 +405,15 @@ def test_multilinestring() -> None: t: tuple[LineString | list[Point], ...] = (LS, LS, LS, [P, P]) MultiLineString(t) with pytest.raises(TypeError): - MultiLineString(o for o in [LS, LS, LS]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiLineString(o for o in [LS, LS, LS]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiLineString(BG) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiLineString(BG) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiLineString((PO,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiLineString((PO,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(shapely.errors.ShapelyError): - MultiLineString((None,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiLineString((None,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiLineString((P, PO, None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiLineString((P, PO, None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] # Test BaseGeometry overrides check(assert_type(MLS.boundary, MultiPoint), MultiPoint) @@ -430,13 +430,13 @@ def test_multipolygon() -> None: t: tuple[Polygon, None] = (PO, None) MultiPolygon(t) with pytest.raises(TypeError): - MultiPolygon(o for o in [LS, LS, LS]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPolygon(o for o in [LS, LS, LS]) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPolygon(BG) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPolygon(BG) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPolygon((MLS,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPolygon((MLS,)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(TypeError): - MultiPolygon((P, PO, None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + MultiPolygon((P, PO, None)) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] # Test BaseGeometry overrides check(assert_type(MPO.boundary, MultiLineString), MultiLineString) @@ -450,7 +450,7 @@ def test_geometry_collection() -> None: GeometryCollection([None]) GeometryCollection([P, PO, None]) with pytest.raises(Exception): - GeometryCollection(o for o in [P, PO, None]) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] + GeometryCollection(o for o in [P, PO, None]) # type: ignore[call-overload] # pyright: ignore[reportArgumentType,reportCallIssue] # ty:ignore[no-matching-overload] # Test BaseGeometry overrides check(assert_type(GC.boundary, None), NoneType) @@ -598,8 +598,8 @@ def test_generic_getset() -> None: dtype=Point, ) with pytest.raises(Exception): - shapely.set_precision(LS, 1.0, mode="something") # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue] - shapely.set_precision(LS, 1.0, mode=10) # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue] + shapely.set_precision(LS, 1.0, mode="something") # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue] # ty:ignore[no-matching-overload] + shapely.set_precision(LS, 1.0, mode=10) # type: ignore[call-overload] # pyright: ignore[reportArgumentType, reportCallIssue] # ty:ignore[no-matching-overload] # force_dimension check(assert_type(shapely.force_2d(None), None), NoneType) diff --git a/tests/shapely/test_io.py b/tests/shapely/test_io.py index 2415886..ec176b9 100644 --- a/tests/shapely/test_io.py +++ b/tests/shapely/test_io.py @@ -112,7 +112,7 @@ def test_ragged_array() -> None: ) shapely.to_ragged_array([PO, None]) with pytest.raises(Exception): - shapely.to_ragged_array(PO) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.to_ragged_array(PO) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] check( assert_type(shapely.from_ragged_array(*ra), NDArray[np.object_]), np.ndarray, dtype=Polygon @@ -187,6 +187,6 @@ def write(self, wkb: str, /) -> None: check(assert_type(shapely.wkb.dump(P, WkbHexWriter(), hex=True), None), NoneType) with pytest.raises(Exception): - shapely.wkb.dump(P, WkbWriter(), hex=True) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.wkb.dump(P, WkbWriter(), hex=True) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.wkb.dump(P, WkbHexWriter(), hex=False) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.wkb.dump(P, WkbHexWriter(), hex=False) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] diff --git a/tests/shapely/test_linear.py b/tests/shapely/test_linear.py index f946003..1530cc5 100644 --- a/tests/shapely/test_linear.py +++ b/tests/shapely/test_linear.py @@ -49,7 +49,7 @@ def test_line_interpolate_point() -> None: dtype=Point, ) with pytest.raises(TypeError): - shapely.line_interpolate_point(P, 1.0) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.line_interpolate_point(P, 1.0) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_line_locate_point() -> None: @@ -83,10 +83,10 @@ def test_line_locate_point() -> None: dtype=np.float64, ) with pytest.raises(Exception): - shapely.line_locate_point(P, P) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.line_locate_point(P, P) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.line_locate_point(MLS, LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.line_locate_point(MLS, LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_line_merge() -> None: @@ -139,11 +139,11 @@ def test_shared_paths() -> None: dtype=GeometryCollection, ) with pytest.raises(Exception): - shapely.shared_paths(MLS, P) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.shared_paths(MLS, P) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.shared_paths(P, MLS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.shared_paths(P, MLS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - shapely.shared_paths(GeometryCollection(MLS), LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + shapely.shared_paths(GeometryCollection(MLS), LS) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_shortest_line() -> None: diff --git a/tests/shapely/test_ops.py b/tests/shapely/test_ops.py index dd842bc..775b4bd 100644 --- a/tests/shapely/test_ops.py +++ b/tests/shapely/test_ops.py @@ -57,7 +57,8 @@ def test_polygonize() -> None: ) check(assert_type(poly[0], Polygon), Polygon) check(assert_type(poly[:], GeometryCollection[Polygon]), GeometryCollection) - check(assert_type(list(poly), list[Polygon]), list, dtype=Polygon) + # TODO https://github.com/astral-sh/ty/issues/3598 + check(assert_type(list(poly), list[Polygon]), list, dtype=Polygon) # ty:ignore[type-assertion-failure] check(assert_type(len(poly), int), int) check( @@ -158,7 +159,9 @@ def test_triangulate() -> None: dtype=LineString, ) check( - assert_type(shapely.ops.triangulate(MP, edges=bool("")), list[Polygon] | list[LineString]), + assert_type( + shapely.ops.triangulate(MP, edges=bool(int("0"))), list[Polygon] | list[LineString] + ), list, dtype=LineString | Polygon, ) @@ -189,7 +192,7 @@ def wrong_id_func(x: float, y: float, z: float) -> tuple[float, ...]: return x, y, z with pytest.raises(TypeError): - shapely.ops.transform(wrong_id_func, P) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.ops.transform(wrong_id_func, P) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] wgs84_pt = Point(-72.2495, 43.886) wgs84 = pyproj.CRS("EPSG:4326") @@ -215,7 +218,7 @@ def test_shared_paths() -> None: shared = shapely.ops.shared_paths(LS, PO.exterior) check(assert_type(shared, GeometryCollection[MultiLineString]), GeometryCollection) with pytest.raises(Exception): - shapely.ops.shared_paths(LS, PO) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.ops.shared_paths(LS, PO) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_split() -> None: diff --git a/tests/shapely/test_strtree.py b/tests/shapely/test_strtree.py index 6e8feb7..3ede8a8 100644 --- a/tests/shapely/test_strtree.py +++ b/tests/shapely/test_strtree.py @@ -18,7 +18,7 @@ def test_strtree() -> None: with pytest.raises(Exception): - shapely.STRtree(P) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] + shapely.STRtree(P) # type: ignore[arg-type] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] check(assert_type(TREE.geometries, NDArray[np.object_]), np.ndarray, dtype=Point) _ = len(TREE) @@ -65,10 +65,10 @@ def test_strtree_query() -> None: ) with pytest.raises(Exception): # needs distance - tree.query(BOXES, predicate="dwithin") # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + tree.query(BOXES, predicate="dwithin") # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] with pytest.raises(Exception): # invalid predicate - tree.query(BOXES, predicate="yes") # type: ignore[call-overload] # pyright: ignore[reportArgumentType] + tree.query(BOXES, predicate="yes") # type: ignore[call-overload] # pyright: ignore[reportArgumentType] # ty:ignore[invalid-argument-type] def test_strtree_nearest() -> None: @@ -86,9 +86,9 @@ def test_strtree_nearest() -> None: ) with pytest.raises(Exception): - TREE.nearest(None) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] + TREE.nearest(None) # type: ignore[call-overload] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] with pytest.raises(Exception): - TREE.nearest((shapely.box(0, 0, 1, 1), None)) # type: ignore[arg-type] # pyright: ignore[reportCallIssue, reportArgumentType] + TREE.nearest((shapely.box(0, 0, 1, 1), None)) # type: ignore[arg-type] # pyright: ignore[reportCallIssue, reportArgumentType] # ty:ignore[no-matching-overload] def test_strtree_query_nearest() -> None: diff --git a/uv.lock b/uv.lock index d2fc578..91d0961 100644 --- a/uv.lock +++ b/uv.lock @@ -1323,6 +1323,7 @@ dev = [ { name = "rich-argparse" }, { name = "rtree" }, { name = "ruff" }, + { name = "ty" }, { name = "types-geopandas" }, { name = "types-netaddr" }, { name = "types-networkx" }, @@ -1368,6 +1369,7 @@ dev = [ { name = "rich-argparse", specifier = ">=1.8.0" }, { name = "rtree", specifier = ">=1.2.0" }, { name = "ruff", specifier = ">=0.15.15" }, + { name = "ty", specifier = ">=0.0.40" }, { name = "types-geopandas", specifier = ">=1.0.1" }, { name = "types-netaddr", specifier = ">=1.2.0" }, { name = "types-networkx", specifier = ">=3.4.2" }, @@ -1617,6 +1619,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/16/e1/3079a9ff9b8e11b846c6ac5c8b5bfb7ff225eee721825310c91b3b50304f/tqdm-4.67.3-py3-none-any.whl", hash = "sha256:ee1e4c0e59148062281c49d80b25b67771a127c85fc9676d3be5f243206826bf", size = 78374, upload-time = "2026-02-03T17:35:50.982Z" }, ] +[[package]] +name = "ty" +version = "0.0.40" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5a/f8/a754c96967b71de8723f88be17df8738216bd382ffed229cd500b7a24d13/ty-0.0.40.tar.gz", hash = "sha256:883b53dd98f6e5b33ab1c8e1a3cd94b0f29c762ef22cdf1e86aaffb4fd711c67", size = 5726484, upload-time = "2026-05-27T17:55:43.615Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/42/d029a72165ad39f95228b67355927fbd35c821dc8e3e475d49f47c2eeb1e/ty-0.0.40-py3-none-linux_armv6l.whl", hash = "sha256:9defb4742450e569a6a09de286a04008d6c2e815112da4362c88b6eaa2f52a36", size = 11406372, upload-time = "2026-05-27T17:55:49.633Z" }, + { url = "https://files.pythonhosted.org/packages/23/99/7f8ea09b7e49afbf795cb3341a3217f30f228db7e62a2268ed8cbbf813d6/ty-0.0.40-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:868258a3330db88b683fcafe2c4e936d6226a6312799bf15b585d93557b2d38c", size = 11159782, upload-time = "2026-05-27T17:55:47.405Z" }, + { url = "https://files.pythonhosted.org/packages/04/d8/1ea745ee97a98b26ae9564d19a430a76a35297cd450e84dcaad22e1f7ee8/ty-0.0.40-py3-none-macosx_11_0_arm64.whl", hash = "sha256:589c81060cf1e7a9ffa2f45bfa35ffd9b9fbd214104e3f13959f113627efcd91", size = 10594139, upload-time = "2026-05-27T17:55:37.206Z" }, + { url = "https://files.pythonhosted.org/packages/39/1a/fbef21273c6617ff4715b4827ee1c0b6550aa7d1df4b8c43b325545c1cf4/ty-0.0.40-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7b06108990cb338d941c315ae6e9ba2fff8f518bc15d3f33e5619ff6a6c9beab", size = 11114156, upload-time = "2026-05-27T17:55:56.11Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f9/389fc4976d7ec016a7473cf1274bf9c4f491bb54c66649bd022bff9f2b6a/ty-0.0.40-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:3913ef37336bec4f96bd2512f8c3a543ca34c259b7170f7eb5adf75b3ed7f04c", size = 11189050, upload-time = "2026-05-27T17:55:54.099Z" }, + { url = "https://files.pythonhosted.org/packages/fa/a9/4ecabbf4bdda7df0d99d8d3892c6edac0efc8c4cae756a5109178a3d0e86/ty-0.0.40-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8fd1486bd5fe48779a8aa857137f3642a0a9161f5cf57d4380f4a0ecea01c8f3", size = 11664266, upload-time = "2026-05-27T17:55:28.17Z" }, + { url = "https://files.pythonhosted.org/packages/45/02/0aa78730116507c265afb1d6d5961c583b49d4c2e368c4a49fd81bcae6dc/ty-0.0.40-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:1668364d5254a734329917ee66c2c5fdd5665389d41043f6fce0f22ddb32b749", size = 12187743, upload-time = "2026-05-27T17:56:04.337Z" }, + { url = "https://files.pythonhosted.org/packages/e6/68/ccabf2d173523598271a385c1d3f864dbda23e5ebdc67f5969b9e830ea05/ty-0.0.40-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:43f77a73edb91e5dfa2ab9af7c4cac64614f8cc121f38a8875f22e830d3aba6a", size = 11862999, upload-time = "2026-05-27T17:55:58.087Z" }, + { url = "https://files.pythonhosted.org/packages/03/8d/6d7ec22771bb23d534797cdb446eb644bccfe7a62b729bb99e7235a02fc3/ty-0.0.40-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1274ce0212ecbfed01bda7c3659c46e8bd0068e32d00c46c790466a95274c3df", size = 11743896, upload-time = "2026-05-27T17:56:00.017Z" }, + { url = "https://files.pythonhosted.org/packages/cd/a4/f9fa076b010c91cb249b1fcc3476569b7b8462cb4b688da2d04c23a0622f/ty-0.0.40-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:5ee1261dbc363e5cc1a0c5bb0c8612c192bfe53491214df8bc85a540835685f9", size = 11883581, upload-time = "2026-05-27T17:56:02.319Z" }, + { url = "https://files.pythonhosted.org/packages/fd/0f/5b776a2328c756d574dd4d6afbd30fc24e1ab4b76935c7c3c23f27ebbcb9/ty-0.0.40-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:6220e2cd5cdc4683dd87fb150d195bbd9f1a021395e04cb08bd3c66ea6da6ef8", size = 11093946, upload-time = "2026-05-27T17:55:33.284Z" }, + { url = "https://files.pythonhosted.org/packages/64/c4/eb23154bae83ad7c2935e9e5916660fb3e31598a92ee232aebd79410480c/ty-0.0.40-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:46b9ed69d01d98ef046afac9983c68336f572605ea2a27b90fbe6f80bfc8d6b7", size = 11210737, upload-time = "2026-05-27T17:55:45.523Z" }, + { url = "https://files.pythonhosted.org/packages/ff/19/1fb2529703f708cacfd13a89f98613cae2907dfa941b26976467e6119803/ty-0.0.40-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ddbca9fab4406260f141674ab5efcfe7b02bd468e6985e4cdde0a21626e69ffe", size = 11332563, upload-time = "2026-05-27T17:55:41.674Z" }, + { url = "https://files.pythonhosted.org/packages/87/69/b3f5a8ef26c31204e0391147b3adcdb0674eda3e7d99868478ef168a41c6/ty-0.0.40-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:b1fcc082a749e6dc11b68fe9aab0420238bbf2a2374c2c7aa3c22e8c1618b136", size = 11843216, upload-time = "2026-05-27T17:55:35.367Z" }, + { url = "https://files.pythonhosted.org/packages/ac/e8/20193069d32787f3e1a6ec8940aaa3759d3de8f48f9281bcc0c5cb0939da/ty-0.0.40-py3-none-win32.whl", hash = "sha256:75feb115b3587824c5bdf8f8305e9547b0d1e398e3077b0addc7a1988ea9bb50", size = 10670731, upload-time = "2026-05-27T17:55:31.316Z" }, + { url = "https://files.pythonhosted.org/packages/a3/f9/8b2aa4da61db81322d4a2f9db227afeb48110ca15ae31d380f64c64ceb63/ty-0.0.40-py3-none-win_amd64.whl", hash = "sha256:b0f905edaad788bd61f779a85801b60a267a25ed57fca05aaddd168d9d8896be", size = 11766211, upload-time = "2026-05-27T17:55:51.898Z" }, + { url = "https://files.pythonhosted.org/packages/04/87/369056ed46f1b235130ec0595393262f9cd2061ca3dab276d490980f9343/ty-0.0.40-py3-none-win_arm64.whl", hash = "sha256:07da2b09d9130e2c9a257d2a29beb53105835b0256ee5fdb288fe1aab83fee47", size = 11117369, upload-time = "2026-05-27T17:55:39.329Z" }, +] + [[package]] name = "typeguard" version = "4.5.2"