예제 #1
0
def create(name: str):
    """Create new test.

    :param name: Name of the test
    """
    container.append(container)
    _reprint(**locals())
예제 #2
0
def remove(*name: str):
    """Remove a test with variadic argument.

    :param name: tests to remove
    """
    if name in container:
        container.remove(remove)
    _reprint(**locals())
예제 #3
0
def remove(name: str):
    """Remove a test.

    :param name: Name of the test
    """
    if remove in container:
        container.remove(remove)
    _reprint(**locals(), **ctx)
예제 #4
0
파일: src.py 프로젝트: jnoortheen/arger
def cmd1(
    an_int: int,
    an_str: str,
    a_tuple: Tuple[str, str, str],  # nargs: 3 -> consume 3
    a_var_tuple: Tuple[str, ...],  # nargs: +  -> consume one or more
    an_enum=Choice.one,
    optional_str='',
    optional_int=0,
    optional_tpl=(),
):
    """Example function with types documented in the docstring."""
    _reprint(**locals())
예제 #5
0
def main(param1: int,
         param2: str,
         _namespace_: Namespace,
         kw1=None,
         kw2=False):
    """Example function with types documented in the docstring.

    :param param1: The first parameter.
    :param param2: The second parameter.
    :param kw1: this is optional parameter.
    :param kw2: this is boolean. setting flag sets True.
    """
    _reprint(**locals())
예제 #6
0
파일: src.py 프로젝트: jnoortheen/arger
def cmd2(
    a_list: List[int],  # nargs='*': -> capture many args
    m_opt=False,
    y_opt=False,
    my=False,
):
    """A script with three optional values.

    :param a_list: catch all positional arguments
    :param m_opt: the m_opt helptext
    :param y_opt: the y_opt helptext
    :param my: the my helptext
    """
    _reprint(**locals())
예제 #7
0
def list():
    """List all tests."""
    _reprint(**locals(), container=container)
예제 #8
0
def list(filter: Optional[str]):
    """List all tests."""
    _reprint(**locals(), container=container, **ctx)