Use ruff linter to fix issues and provide consistent formatting

This commit is contained in:
Ian Renton
2026-08-15 08:25:54 +01:00
parent 7391c28cd0
commit af3f82c14d
121 changed files with 1989 additions and 996 deletions
+11 -17
View File
@@ -1,4 +1,10 @@
from prometheus_client import CollectorRegistry, generate_latest, Counter, disable_created_metrics, Gauge
from prometheus_client import (
CollectorRegistry,
Counter,
Gauge,
disable_created_metrics,
generate_latest,
)
disable_created_metrics()
# Prometheus metrics registry
@@ -9,25 +15,13 @@ page_requests_counter = Counter(
"Total number of page requests received",
registry=registry,
)
api_requests_counter = Counter(
"spothole_api_requests",
"Total number of API requests received",
registry=registry
)
spots_gauge = Gauge(
"spothole_spots",
"Number of spots currently in the software",
registry=registry
)
alerts_gauge = Gauge(
"spothole_alerts",
"Number of alerts currently in the software",
registry=registry
)
api_requests_counter = Counter("spothole_api_requests", "Total number of API requests received", registry=registry)
spots_gauge = Gauge("spothole_spots", "Number of spots currently in the software", registry=registry)
alerts_gauge = Gauge("spothole_alerts", "Number of alerts currently in the software", registry=registry)
memory_use_gauge = Gauge(
"spothole_memory_usage_bytes",
"Current memory usage of the software in bytes",
registry=registry
registry=registry,
)