Skip to content
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
6 changes: 3 additions & 3 deletions requirements-tests.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Tools
# -----
ruff==0.7.3 # must match .pre-commit-config.yaml
ruff==0.8.0 # must match .pre-commit-config.yaml
pytest>=8.0
rich-argparse>=1.5.2
mypy==1.13.0
pyright==1.1.388
pyright==1.1.389

# Runtime dependencies
# --------------------
Expand All @@ -13,7 +13,7 @@ geopandas>=1.0.0
# Transient dependencies
# ----------------------
# geopandas
types-shapely>=2.0.0.20240820
types-shapely>=2.0.0.20241112
pandas-stubs>=2.2.3.241009
matplotlib>=3.8.0
folium>=0.16.0
Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

Command | Default invocation |
------- | ------------------ |
{_newl.join(f"{tool} | {l2c((*tool.split('-'), *default))}" for tool, default in default_args.items())}
{_newl.join(f"`{tool}` | `{l2c((*tool.split('-'), *default))}`" for tool, default in default_args.items())}

You can override the default invocation by passing extra args after the command:

Expand Down
4 changes: 3 additions & 1 deletion stubs/geopandas-stubs/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from typing import Final

from ._config import options as options
from ._exports import (
gpd as gpd,
Expand All @@ -15,4 +17,4 @@ from .geoseries import GeoSeries as GeoSeries
from .tools import clip as clip, overlay as overlay, sjoin as sjoin, sjoin_nearest as sjoin_nearest
from .tools._show_versions import show_versions as show_versions

__version__: str
__version__: Final[str]
3 changes: 3 additions & 0 deletions stubs/geopandas-stubs/geodataframe.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
def from_dict( # type: ignore[override]
cls, data: Mapping[Hashable, Any], geometry: _GeomCol | None = None, crs: _ConvertibleToCRS | None = None, **kwargs
) -> Self: ...
# Keep inline with GeoSeries.from_file and geopandas.io.file._read_file
@classmethod
def from_file(
cls,
Expand All @@ -109,6 +110,8 @@ class GeoDataFrame(GeoPandasBase, pd.DataFrame): # type: ignore[misc]
rows: int | slice | None = None,
engine: Literal["fiona", "pyogrio"] | None = None,
ignore_geometry: Literal[False] = False,
layer: int | str | None = None,
encoding: str | None = None,
**kwargs, # engine dependent
) -> Self: ...
@classmethod
Expand Down
3 changes: 3 additions & 0 deletions stubs/geopandas-stubs/geoseries.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ class GeoSeries(GeoPandasBase, pd.Series[BaseGeometry]): # type: ignore[type-va
def y(self) -> pd.Series[float]: ...
@property
def z(self) -> pd.Series[float]: ...
# Keep inline with GeoDataFrame.from_file and geopandas.io.file._read_file
@classmethod
def from_file(
cls,
Expand All @@ -65,6 +66,8 @@ class GeoSeries(GeoPandasBase, pd.Series[BaseGeometry]): # type: ignore[type-va
rows: int | slice | None = None,
engine: Literal["fiona", "pyogrio"] | None = None,
ignore_geometry: Literal[False] = False,
layer: int | str | None = None,
encoding: str | None = None,
**kwargs: Any, # engine dependent
) -> GeoSeries: ...
@classmethod
Expand Down
3 changes: 2 additions & 1 deletion stubs/geopandas-stubs/io/_geoarrow.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ _PATable: TypeAlias = Incomplete
_PAField: TypeAlias = Incomplete
_PAArray: TypeAlias = Incomplete

_GeomEncoding: TypeAlias = Literal["WKB", "geoarrow", "wkb", "GeoArrow"]
# Literal for language server completions and str because runtime normalizes to lowercase
_GeomEncoding: TypeAlias = Literal["WKB", "geoarrow"] | str # noqa: PYI051

GEOARROW_ENCODINGS: list[str]

Expand Down
10 changes: 5 additions & 5 deletions stubs/geopandas-stubs/io/arrow.pyi
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import os
from _typeshed import SupportsGetItem, SupportsKeysAndGetItem
from collections.abc import Iterable
from typing import Any
from typing import Any, Final

from geopandas.geodataframe import GeoDataFrame

METADATA_VERSION: str
SUPPORTED_VERSIONS: list[str]
GEOARROW_ENCODINGS: list[str]
SUPPORTED_ENCODINGS: list[str]
METADATA_VERSION: Final[str]
SUPPORTED_VERSIONS: Final[list[str]]
GEOARROW_ENCODINGS: Final[list[str]]
SUPPORTED_ENCODINGS: Final[list[str]]

def _read_parquet(
path: str | os.PathLike[str],
Expand Down
1 change: 1 addition & 0 deletions stubs/geopandas-stubs/io/file.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ from pandas._typing import Axes
from geopandas.base import _BboxLike, _MaskLike
from geopandas.geodataframe import GeoDataFrame

# Keep inline with GeoDataFrame.from_file and GeoSeries.from_file
@overload
def _read_file(
filename: str | os.PathLike[str] | SupportsRead[Any],
Expand Down
4 changes: 2 additions & 2 deletions stubs/geopandas-stubs/sindex.pyi
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from typing import Literal, overload
from typing import Final, Literal, overload

import numpy as np
from numpy.typing import ArrayLike, NDArray
from shapely import Geometry

PREDICATES: set[str | None]
PREDICATES: Final[set[str | None]]

class SpatialIndex:
geometries: NDArray[np.object_]
Expand Down
10 changes: 5 additions & 5 deletions stubs/pandapower-stubs/auxiliary.pyi
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from _typeshed import _KT, _VT, Incomplete
from collections.abc import Iterable, Mapping, MutableMapping, MutableSequence, Sized
from typing import Any, NoReturn, SupportsInt, TypeVar
from typing import Any, NoReturn, SupportsIndex as Int, TypeVar
from typing_extensions import Self

import numpy as np
Expand Down Expand Up @@ -106,10 +106,10 @@ def get_free_id(df: Sized) -> int: ...
class ppException(Exception): ...

def get_indices(
selection: Iterable[int], lookup: Mapping[int, int] | Mapping[str, Mapping[int, int]], fused_indices: bool = True
selection: Iterable[Int], lookup: Mapping[Int, Int] | Mapping[str, Mapping[Int, Int]], fused_indices: bool = True
) -> NDArray[np.int_]: ...
def ensure_iterability(var: _T | Iterable[_T], len_: int | None = None) -> Iterable[_T]: ...
def get_values(source: Incomplete, selection: Iterable[SupportsInt], lookup: Mapping[int, int]) -> NDArray[np.int_]: ...
def ensure_iterability(var: _T | Iterable[_T], len_: Int | None = None) -> Iterable[_T]: ...
def get_values(source: Incomplete, selection: Iterable[Int], lookup: Mapping[Int, Int]) -> NDArray[np.int_]: ...
def set_elements_oos(ti: Sized, tis: Incomplete, bis: Incomplete, lis: MutableSequence[bool]) -> None: ...
def set_isolated_buses_oos(
bus_in_service: MutableSequence[bool], ppc_bus_isolated: Incomplete, bus_lookup: Incomplete
Expand All @@ -136,5 +136,5 @@ def I_from_V(Y: ArrayLike, V: ArrayLike) -> NDArray[np.complex128]: ...
def S_from_VI_elementwise(V: ArrayLike, I: ArrayLike) -> NDArray[np.complex128]: ...
def I_from_SV_elementwise(S: ArrayLike, V: ArrayLike) -> NDArray[np.complex128]: ...
def SVabc_from_SV012(
S012: ArrayLike, V012: ArrayLike, n_res: int | None = None, idx: int | ArrayLike | None = None
S012: ArrayLike, V012: ArrayLike, n_res: Int | None = None, idx: Int | ArrayLike | None = None
) -> tuple[NDArray[np.complex128], NDArray[np.complex128]]: ...
2 changes: 1 addition & 1 deletion stubs/pandapower-stubs/control/run_control.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def control_implementation(
ctrl_variables: dict[str, Incomplete],
max_iter: int,
evaluate_net_fct: Callable[..., dict[str, Incomplete]] = ...,
**kwargs: Incomplete,
**kwargs,
) -> None: ...
def control_finalization(controller_order: Incomplete) -> None: ...
def run_control(
Expand Down
Loading