Skip to content

Commit

Permalink
annotate return types of a few functions to enable mypy check
Browse files Browse the repository at this point in the history
  • Loading branch information
tdadela committed May 5, 2024
1 parent 87acda7 commit 3abbf03
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class FastHttpUser(User):

_callstack_regex = re.compile(r' File "(\/.[^"]*)", line (\d*),(.*)')

def __init__(self, environment):
def __init__(self, environment) -> None:
super().__init__(environment)
if self.host is None:
raise LocustError(
Expand Down
4 changes: 2 additions & 2 deletions locust/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ def user_count(self) -> int:


class WorkerNodes(MutableMapping):
def __init__(self):
def __init__(self) -> None:
self._worker_nodes: dict[str, WorkerNode] = {}

def get_by_state(self, state) -> list[WorkerNode]:
Expand Down Expand Up @@ -648,7 +648,7 @@ class MasterRunner(DistributedRunner):
:class:`WorkerRunners <WorkerRunner>` will aggregated.
"""

def __init__(self, environment, master_bind_host, master_bind_port):
def __init__(self, environment, master_bind_host, master_bind_port) -> None:
"""
:param environment: Environment instance
:param master_bind_host: Host/interface to use for incoming worker connections
Expand Down

0 comments on commit 3abbf03

Please sign in to comment.