From 74d5de457fb68a26fe49670aec98e26feccead6b Mon Sep 17 00:00:00 2001 From: Lars Holmberg Date: Sat, 2 Nov 2024 09:34:58 +0100 Subject: [PATCH] Fix bad type hint. --- locust/stats.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/locust/stats.py b/locust/stats.py index cc802f81a6..5e1e033d71 100644 --- a/locust/stats.py +++ b/locust/stats.py @@ -200,7 +200,7 @@ def __init__(self, use_response_times_cache=True, exclude_from_aggregation: str self.entries: dict[tuple[str, str], StatsEntry] = EntriesDict(self) self.errors: dict[str, StatsError] = {} self.total = StatsEntry(self, "Aggregated", None, use_response_times_cache=self.use_response_times_cache) - self.history = [] + self.history: list[dict] = [] @property def num_requests(self): @@ -285,7 +285,9 @@ class StatsEntry: Represents a single stats entry (name and method) """ - def __init__(self, stats: RequestStats | None, name: str, method: str, use_response_times_cache: bool = False): + def __init__( + self, stats: RequestStats | None, name: str, method: str | None, use_response_times_cache: bool = False + ): self.stats = stats self.name = name """ Name (URL) of this stats entry """