Skip to content

Commit fc607db

Browse files
authored
Merge pull request #742 from OpenTrafficCam/dependabot/pip/pandas-stubs-2.3.2.250926
Bump pandas-stubs from 2.2.3.241126 to 2.3.2.250926
2 parents cedd57e + 68011be commit fc607db

4 files changed

Lines changed: 14 additions & 11 deletions

File tree

‎OTAnalytics/plugin_datastore/track_store.py‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,12 @@ def input_file(self) -> str:
109109
def __eq__(self, other: Any) -> bool:
110110
if not isinstance(other, PandasDetection):
111111
return False
112+
# Ensure a builtins.bool is returned (pandas .all() may return numpy.bool_)
113+
data_equal: bool = bool((self._data == other._data).all())
112114
return (
113-
self._track_id == other._track_id
114-
and self._occurrence == other._occurrence
115-
and (self._data == other._data).all()
115+
(self._track_id == other._track_id)
116+
and (self._occurrence == other._occurrence)
117+
and data_equal
116118
)
117119

118120
def __hash__(self) -> int:

‎OTAnalytics/plugin_ui/visualization/counts/counts_plotter.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,10 @@ def _prepare_dataframe(self, count: Count) -> DataFrame:
363363
dataframe = dataframe.sort_values(LEVEL_START_TIME)
364364

365365
# Build full combination index (flow x start time x classification)
366-
all_flows = dataframe[LEVEL_FLOW].unique()
367-
all_times = dataframe[LEVEL_START_TIME].unique()
368-
all_classes = dataframe[LEVEL_CLASSIFICATION].unique()
366+
# Convert numpy arrays from .unique() to plain Python lists for type checking
367+
all_flows = dataframe[LEVEL_FLOW].unique().tolist()
368+
all_times = dataframe[LEVEL_START_TIME].unique().tolist()
369+
all_classes = dataframe[LEVEL_CLASSIFICATION].unique().tolist()
369370
multi_index = [LEVEL_FLOW, LEVEL_START_TIME, LEVEL_CLASSIFICATION]
370371
full_index = MultiIndex.from_product(
371372
[all_flows, all_times, all_classes],

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ dev = [
5454
"interrogate==1.7.0",
5555
"isort==6.0.1",
5656
"mypy==1.16.1",
57-
"pandas-stubs==2.2.3.241126",
57+
"pandas-stubs==2.3.2.250926",
5858
"pre-commit==4.1.0",
5959
"pytest==8.3.4",
6060
"pytest-asyncio==0.24.0",

‎uv.lock‎

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)