Skip to content

Commit

Permalink
add typing metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
fabito committed Sep 12, 2021
1 parent 3fcd2b7 commit 531e555
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions locust/argument_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import sys
import textwrap
from typing import Dict

import configargparse

Expand Down Expand Up @@ -35,8 +36,8 @@ def add_argument(self, *args, **kwargs) -> configargparse.Action:
return action

@property
def args_included_in_web_ui(self):
return {a.dest for a in self._actions if hasattr(a, "include_in_web_ui") and a.include_in_web_ui}
def args_included_in_web_ui(self) -> Dict[str, configargparse.Action]:
return {a.dest: a for a in self._actions if hasattr(a, "include_in_web_ui") and a.include_in_web_ui}


def _is_package(path):
Expand Down Expand Up @@ -498,8 +499,8 @@ def default_args_dict():
return vars(default_parser.parse([]))


def ui_extra_args_dict(args=None):

def ui_extra_args_dict(args=None) -> Dict[str, str]:
"""Get all the UI visible arguments"""
locust_args = default_args_dict()

parser = get_parser()
Expand Down

0 comments on commit 531e555

Please sign in to comment.