Skip to content
Merged
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: 4 additions & 2 deletions quasardb/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ def _by_uid(
continue

if not metric in idx:
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Use the Pythonic 'metric not in idx' syntax instead of 'not metric in idx' for better readability. Change to 'if metric not in idx:'.

Copilot uses AI. Check for mistakes.
raise Exception(f"Metric not in internal index: {metric}")
logger.warning("Metric not in internal index: %s", metric)
continue

# Parse user id
uid = int(uid_str)
Expand Down Expand Up @@ -362,7 +363,8 @@ def _cumulative(
continue

if not metric in idx:
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Use the Pythonic 'metric not in idx' syntax instead of 'not metric in idx' for better readability. Change to 'if metric not in idx:'.

Suggested change
if not metric in idx:
if metric not in idx:

Copilot uses AI. Check for mistakes.
raise Exception(f"Metric not in internal index: {metric}")
logger.warning("Metric not in internal index: %s", metric)
continue

x = idx[metric].copy()
x["value"] = v
Expand Down
Loading