diff --git a/locust/stats.py b/locust/stats.py index 24a5a55e7e..7e63addb37 100644 --- a/locust/stats.py +++ b/locust/stats.py @@ -198,7 +198,7 @@ def __init__(self, use_response_times_cache=True, environment: Environment | Non self.errors: dict[str, StatsError] = {} self.total = StatsEntry(self, "Aggregated", None, use_response_times_cache=self.use_response_times_cache) self.environment = environment - self.history = [] + self.history: list[dict] = [] @property def num_requests(self): @@ -284,7 +284,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 """