Skip to content

Commit

Permalink
fix: Mypy reported issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tyge68 committed Oct 26, 2024
1 parent faeef8e commit a2a041f
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 @@ -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):
Expand Down Expand Up @@ -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 """
Expand Down

0 comments on commit a2a041f

Please sign in to comment.