Skeleton ready
This commit is contained in:
0
shared/application/manager/__init__.py
Normal file
0
shared/application/manager/__init__.py
Normal file
40
shared/application/manager/listener_arguments_parser.py
Normal file
40
shared/application/manager/listener_arguments_parser.py
Normal file
@@ -0,0 +1,40 @@
|
||||
from typing import Any, Sequence
|
||||
from argparse import ArgumentParser, HelpFormatter
|
||||
|
||||
|
||||
class ListenerArgumentsParser(ArgumentParser):
|
||||
def __init__(
|
||||
self,
|
||||
prog: str | None = None,
|
||||
usage: str | None = None,
|
||||
description: str | None = None,
|
||||
epilog: str | None = None,
|
||||
parents: Sequence[ArgumentParser] = [],
|
||||
formatter_class: type[HelpFormatter] = HelpFormatter,
|
||||
prefix_chars: str = '-',
|
||||
fromfile_prefix_chars: str | None = None,
|
||||
argument_default: Any = None,
|
||||
conflict_handler: str = 'error',
|
||||
add_help: bool = True,
|
||||
allow_abbrev: bool = True,
|
||||
exit_on_error: bool = True
|
||||
) -> None:
|
||||
super().__init__(
|
||||
prog=prog,
|
||||
usage=usage,
|
||||
description=description,
|
||||
epilog=epilog,
|
||||
parents=parents,
|
||||
formatter_class=formatter_class,
|
||||
prefix_chars=prefix_chars,
|
||||
fromfile_prefix_chars=fromfile_prefix_chars,
|
||||
argument_default=argument_default,
|
||||
conflict_handler=conflict_handler,
|
||||
add_help=add_help,
|
||||
allow_abbrev=allow_abbrev,
|
||||
exit_on_error=exit_on_error
|
||||
)
|
||||
|
||||
self.add_argument('--queue', type=str, required=True)
|
||||
self.add_argument('--exchange', type=str, required=True)
|
||||
self.add_argument('--routing-key', type=str, default="")
|
||||
Reference in New Issue
Block a user