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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
args: ["--maxkb=5500"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.0
rev: v0.15.0
hooks:
- id: ruff
args: ["--fix"]
Expand Down
4 changes: 2 additions & 2 deletions lonboard/_constants.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from enum import Enum
from enum import Enum, StrEnum

import pyproj

Expand Down Expand Up @@ -110,7 +110,7 @@ def __str__(self) -> str:
return self.value.decode()


class Environment(str, Enum):
class Environment(StrEnum):
Azure = "azure"
"""Azure notebook"""

Expand Down
4 changes: 2 additions & 2 deletions lonboard/_geoarrow/extension_types.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from __future__ import annotations

import json
from enum import Enum
from enum import StrEnum
from typing import TYPE_CHECKING

import numpy as np
Expand All @@ -16,7 +16,7 @@
from pyproj import CRS


class CoordinateDimension(str, Enum):
class CoordinateDimension(StrEnum):
XY = "xy"
XYZ = "xyz"
XYM = "xym"
Expand Down
8 changes: 4 additions & 4 deletions lonboard/_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def viz(
)
COLOR_COUNTER += 1

map_kwargs = map_kwargs if map_kwargs else {}
map_kwargs = map_kwargs or {}

if "basemap_style" not in map_kwargs and "basemap" not in map_kwargs:
map_kwargs["basemap"] = MaplibreBasemap(
Expand Down Expand Up @@ -484,7 +484,7 @@ def _viz_geoarrow_table(
geometry_ext_type = geometry_field.metadata.get(b"ARROW:extension:name")

if geometry_ext_type in [EXTENSION_NAME.POINT, EXTENSION_NAME.MULTIPOINT]:
scatterplot_kwargs = scatterplot_kwargs if scatterplot_kwargs else {}
scatterplot_kwargs = scatterplot_kwargs or {}

if "get_fill_color" not in scatterplot_kwargs:
scatterplot_kwargs["get_fill_color"] = _viz_color
Expand Down Expand Up @@ -513,7 +513,7 @@ def _viz_geoarrow_table(
EXTENSION_NAME.LINESTRING,
EXTENSION_NAME.MULTILINESTRING,
]:
path_kwargs = path_kwargs if path_kwargs else {}
path_kwargs = path_kwargs or {}

if "get_color" not in path_kwargs:
path_kwargs["get_color"] = _viz_color
Expand Down Expand Up @@ -543,7 +543,7 @@ def _viz_geoarrow_table(
EXTENSION_NAME.MULTIPOLYGON,
EXTENSION_NAME.BOX,
]:
polygon_kwargs = polygon_kwargs if polygon_kwargs else {}
polygon_kwargs = polygon_kwargs or {}

if "get_fill_color" not in polygon_kwargs:
polygon_kwargs["get_fill_color"] = _viz_color
Expand Down
6 changes: 3 additions & 3 deletions lonboard/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from enum import Enum
from enum import StrEnum
from typing import TYPE_CHECKING

import traitlets.traitlets as t
Expand All @@ -15,7 +15,7 @@
from typing import Literal


class CartoStyle(str, Enum):
class CartoStyle(StrEnum):
"""Maplibre-supported vector basemap styles provided by Carto.

Refer to [Carto
Expand Down Expand Up @@ -71,7 +71,7 @@ class CartoStyle(str, Enum):
@deprecated(
"CartoBasemap is deprecated, use CartoStyle instead. Will be removed in v0.14",
)
class CartoBasemap(str, Enum):
class CartoBasemap(StrEnum):
"""Maplibre-supported vector basemap styles provided by Carto.

Refer to [Carto
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ dev = [
"pytest>=8.3.4",
"pytest-ipywidgets>=1.54.0",
"rasterio>=1.4.3",
"ruff>=0.13.0",
"ruff>=0.15.0",
"sidecar>=0.7.0",
"types-geopandas>=1.1.1.20250708",
"types-shapely>=2.1.0.20250512",
Expand Down
45 changes: 22 additions & 23 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.