Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tools #17

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
# --------------------
Expand Down
42 changes: 21 additions & 21 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
# 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
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
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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -100,31 +100,31 @@ 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
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
# mypy
# pyright
tzdata==2024.2
# via pandas
urllib3==2.2.3
urllib3==2.3.0
# via requests
xyzservices==2024.9.0
# via folium
4 changes: 2 additions & 2 deletions stubs/geopandas-stubs/explore.pyi
Original file line number Diff line number Diff line change
@@ -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
Expand Down
40 changes: 20 additions & 20 deletions stubs/pandapower-stubs/converter/cim/other_classes.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
16 changes: 8 additions & 8 deletions stubs/psqlextra-stubs/locking.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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: ...
Expand Down
8 changes: 4 additions & 4 deletions stubs/psqlextra-stubs/partitioning/time_partition_size.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions stubs/psqlextra-stubs/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion tests/geopandas/test_explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 16 additions & 5 deletions tests/shapely/test_coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

Expand All @@ -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,
)
Expand Down
Loading