diff --git a/requirements.in b/requirements.in index 574a49b..f7f667c 100644 --- a/requirements.in +++ b/requirements.in @@ -3,8 +3,8 @@ ruff>=0.8.0 pytest>=8.0 rich-argparse>=1.5.2 -mypy>=1.13.0 -pyright>=1.1.389 +mypy>=1.14.0 +pyright>=1.1.391 # Runtime dependencies # -------------------- diff --git a/requirements.txt b/requirements.txt index 4fc8682..6205d21 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,25 +1,25 @@ # This file was autogenerated by uv via the following command: -# uv pip compile requirements.in -o requirements.txt -branca==0.8.0 +# uv pip compile requirements.in --output-file requirements.txt +branca==0.8.1 # via folium -certifi==2024.8.30 +certifi==2024.12.14 # via # pyogrio # pyproj # requests -charset-normalizer==3.4.0 +charset-normalizer==3.4.1 # via requests contourpy==1.3.1 # via matplotlib cycler==0.12.1 # via matplotlib -django-types==0.19.1 +django-types==0.20.0 # via -r requirements.in djangorestframework-types==0.9.0 # via -r requirements.in -folium==0.18.0 +folium==0.19.3 # via -r requirements.in -fonttools==4.55.0 +fonttools==4.55.3 # via matplotlib geopandas==1.0.1 # via -r requirements.in @@ -27,21 +27,21 @@ idna==3.10 # via requests iniconfig==2.0.0 # via pytest -jinja2==3.1.4 +jinja2==3.1.5 # via # branca # folium -kiwisolver==1.4.7 +kiwisolver==1.4.8 # via matplotlib markdown-it-py==3.0.0 # via rich markupsafe==3.0.2 # via jinja2 -matplotlib==3.9.2 +matplotlib==3.10.0 # via -r requirements.in mdurl==0.1.2 # via markdown-it-py -mypy==1.13.0 +mypy==1.14.0 # via -r requirements.in mypy-extensions==1.0.0 # via mypy @@ -49,7 +49,7 @@ networkx==3.4.2 # via -r requirements.in nodeenv==1.9.1 # via pyright -numpy==2.1.3 +numpy==2.2.1 # via # contourpy # folium @@ -68,7 +68,7 @@ packaging==24.2 # pytest pandas==2.2.3 # via geopandas -pandas-stubs==2.2.3.241009 +pandas-stubs==2.2.3.241126 # via -r requirements.in pillow==11.0.0 # via matplotlib @@ -82,9 +82,9 @@ pyparsing==3.2.0 # via matplotlib pyproj==3.7.0 # via geopandas -pyright==1.1.389 +pyright==1.1.391 # via -r requirements.in -pytest==8.3.3 +pytest==8.3.4 # via -r requirements.in python-dateutil==2.9.0.post0 # via @@ -100,11 +100,11 @@ rich-argparse==1.6.0 # via -r requirements.in rtree==1.3.0 # via -r requirements.in -ruff==0.8.0 +ruff==0.8.4 # via -r requirements.in shapely==2.0.6 # via geopandas -six==1.16.0 +six==1.17.0 # via python-dateutil types-netaddr==1.3.0.20240530 # via -r requirements.in @@ -112,11 +112,11 @@ types-psycopg2==2.9.21.20241019 # via # -r requirements.in # django-types -types-python-dateutil==2.9.0.20241003 +types-python-dateutil==2.9.0.20241206 # via -r requirements.in -types-pytz==2024.2.0.20241003 +types-pytz==2024.2.0.20241221 # via pandas-stubs -types-shapely==2.0.0.20241112 +types-shapely==2.0.0.20241221 # via -r requirements.in typing-extensions==4.12.2 # via @@ -124,7 +124,7 @@ typing-extensions==4.12.2 # pyright tzdata==2024.2 # via pandas -urllib3==2.2.3 +urllib3==2.3.0 # via requests xyzservices==2024.9.0 # via folium diff --git a/stubs/geopandas-stubs/explore.pyi b/stubs/geopandas-stubs/explore.pyi index f2b459c..3df7ac3 100644 --- a/stubs/geopandas-stubs/explore.pyi +++ b/stubs/geopandas-stubs/explore.pyi @@ -1,8 +1,8 @@ from collections.abc import Callable, Hashable, MutableMapping, Sequence from typing import Any -import branca # type: ignore[import-untyped] -import folium # type: ignore[import-untyped] +import branca +import folium import pandas as pd import xyzservices # type: ignore[import-untyped] from matplotlib.colors import Colormap diff --git a/stubs/pandapower-stubs/converter/cim/other_classes.pyi b/stubs/pandapower-stubs/converter/cim/other_classes.pyi index 798b681..9a64252 100644 --- a/stubs/pandapower-stubs/converter/cim/other_classes.pyi +++ b/stubs/pandapower-stubs/converter/cim/other_classes.pyi @@ -4,31 +4,31 @@ from typing import Any from pandapower.converter.cim import interfaces class ReportCode(enum.Enum): - INFO: int - INFO_PARSING: int - INFO_CONVERTING: int - INFO_REPAIRING: int - WARNING: int - WARNING_PARSING: int - WARNING_CONVERTING: int - WARNING_REPAIRING: int - ERROR: int - ERROR_PARSING: int - ERROR_CONVERTING: int - ERROR_REPAIRING: int - EXCEPTION: int - EXCEPTION_PARSING: int - EXCEPTION_CONVERTING: int - EXCEPTION_REPAIRING: int + INFO = 20 + INFO_PARSING = 21 + INFO_CONVERTING = 22 + INFO_REPAIRING = 23 + WARNING = 30 + WARNING_PARSING = 31 + WARNING_CONVERTING = 32 + WARNING_REPAIRING = 33 + ERROR = 40 + ERROR_PARSING = 41 + ERROR_CONVERTING = 42 + ERROR_REPAIRING = 43 + EXCEPTION = 50 + EXCEPTION_PARSING = 51 + EXCEPTION_CONVERTING = 52 + EXCEPTION_REPAIRING = 53 @classmethod def from_value(cls, value: int) -> ReportCode: ... class LogLevel(enum.Enum): - INFO: str - WARNING: str - ERROR: str - EXCEPTION: str + INFO = "INFO" + WARNING = "WARNING" + ERROR = "ERROR" + EXCEPTION = "EXCEPTION" @classmethod def from_value(cls, value: str) -> LogLevel: ... diff --git a/stubs/psqlextra-stubs/locking.pyi b/stubs/psqlextra-stubs/locking.pyi index 323075b..9687a92 100644 --- a/stubs/psqlextra-stubs/locking.pyi +++ b/stubs/psqlextra-stubs/locking.pyi @@ -3,14 +3,14 @@ from enum import Enum from django.db import models class PostgresTableLockMode(Enum): - ACCESS_SHARE: str - ROW_SHARE: str - ROW_EXCLUSIVE: str - SHARE_UPDATE_EXCLUSIVE: str - SHARE: str - SHARE_ROW_EXCLUSIVE: str - EXCLUSIVE: str - ACCESS_EXCLUSIVE: str + ACCESS_SHARE = "ACCESS SHARE" + ROW_SHARE = "ROW SHARE" + ROW_EXCLUSIVE = "ROW EXCLUSIVE" + SHARE_UPDATE_EXCLUSIVE = "SHARE UPDATE EXCLUSIVE" + SHARE = "SHARE" + SHARE_ROW_EXCLUSIVE = "SHARE ROW EXCLUSIVE" + EXCLUSIVE = "EXCLUSIVE" + ACCESS_EXCLUSIVE = "ACCESS EXCLUSIVE" @property def alias(self) -> str: ... diff --git a/stubs/psqlextra-stubs/partitioning/time_partition_size.pyi b/stubs/psqlextra-stubs/partitioning/time_partition_size.pyi index 0afce03..ddef1d6 100644 --- a/stubs/psqlextra-stubs/partitioning/time_partition_size.pyi +++ b/stubs/psqlextra-stubs/partitioning/time_partition_size.pyi @@ -4,10 +4,10 @@ from datetime import datetime from dateutil.relativedelta import relativedelta class PostgresTimePartitionUnit(enum.Enum): - YEARS: str - MONTHS: str - WEEKS: str - DAYS: str + YEARS = "years" + MONTHS = "months" + WEEKS = "weeks" + DAYS = "days" class PostgresTimePartitionSize: unit: PostgresTimePartitionUnit diff --git a/stubs/psqlextra-stubs/types.pyi b/stubs/psqlextra-stubs/types.pyi index b307c73..b4a4656 100644 --- a/stubs/psqlextra-stubs/types.pyi +++ b/stubs/psqlextra-stubs/types.pyi @@ -5,20 +5,20 @@ from typing_extensions import TypeAlias SQL: TypeAlias = str SQLWithParams: TypeAlias = tuple[str, tuple[Any, ...] | dict[str, Any]] -class StrEnum(str, Enum): +class StrEnum(str, Enum): # type: ignore[misc] @classmethod def all(cls) -> list[StrEnum]: ... @classmethod def values(cls) -> list[str]: ... class ConflictAction(Enum): - NOTHING: str - UPDATE: str + NOTHING = "NOTHING" + UPDATE = "UPDATE" @classmethod def all(cls) -> list[ConflictAction]: ... class PostgresPartitioningMethod(StrEnum): - RANGE: str - LIST: str - HASH: str + RANGE = "range" + LIST = "list" + HASH = "hash" diff --git a/tests/geopandas/test_explore.py b/tests/geopandas/test_explore.py index 6974c08..a066ea1 100644 --- a/tests/geopandas/test_explore.py +++ b/tests/geopandas/test_explore.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING -import folium # type: ignore[import-untyped] +import folium import geopandas as gpd from geopandas.explore import _explore, _explore_geoseries from shapely import Point diff --git a/tests/shapely/test_coordinates.py b/tests/shapely/test_coordinates.py index 66fe4bc..96d2c31 100644 --- a/tests/shapely/test_coordinates.py +++ b/tests/shapely/test_coordinates.py @@ -16,11 +16,15 @@ def test_transform() -> None: + # TODO: remove astype(np.float64) when https://github.com/numpy/numpy/issues/28071 is fixed check(assert_type(shapely.transform(P, lambda x: x), Point), Point) - check(assert_type(shapely.transform(P, lambda x: x + 1.0), Point), Point) + check(assert_type(shapely.transform(P, lambda x: (x + 1.0).astype(np.float64)), Point), Point) check(assert_type(shapely.transform(None, lambda x: x), None), NoneType) check( - assert_type(shapely.transform(shapely.from_wkt(P.wkt), lambda x: x + 1.0), BaseGeometry), + assert_type( + shapely.transform(shapely.from_wkt(P.wkt), lambda x: (x + 1.0).astype(np.float64)), + BaseGeometry, + ), Point, ) @@ -30,17 +34,24 @@ def transformer(coords: ArrayLike) -> NDArray[np.float64]: check(assert_type(shapely.transform(P, transformer), Point), Point) check( - assert_type(shapely.transform([P], lambda x: x + 1.0), NDArray[np.object_]), + assert_type( + shapely.transform([P], lambda x: (x + 1.0).astype(np.float64)), NDArray[np.object_] + ), np.ndarray, dtype=Point, ) check( - assert_type(shapely.transform([None], lambda x: x + 1.0), NDArray[np.object_]), + assert_type( + shapely.transform([None], lambda x: (x + 1.0).astype(np.float64)), NDArray[np.object_] + ), np.ndarray, dtype=NoneType, ) check( - assert_type(shapely.transform((P, None), lambda x: x + 1.0), NDArray[np.object_]), + assert_type( + shapely.transform((P, None), lambda x: (x + 1.0).astype(np.float64)), + NDArray[np.object_], + ), np.ndarray, dtype=Point, )