Skip to content

Commit

Permalink
Fix bad type hint.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyberw committed Nov 2, 2024
1 parent 11cd620 commit 74d5de4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions locust/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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 """
Expand Down

0 comments on commit 74d5de4

Please sign in to comment.