forked from fcode/delarte
🚚 rename modules and cli parser Class
This commit is contained in:
parent
5b811be84b
commit
542460fab5
|
@ -17,7 +17,7 @@ from . import hls
|
|||
from . import muxing
|
||||
from . import naming
|
||||
from . import www
|
||||
from .cli_parser import CLIParser
|
||||
from . import cli
|
||||
|
||||
|
||||
def fail(message, code=1):
|
||||
|
@ -69,7 +69,7 @@ def create_progress():
|
|||
|
||||
def main():
|
||||
"""CLI command."""
|
||||
parser = CLIParser()
|
||||
parser = cli.Parser()
|
||||
args = parser.get_args_as_list()
|
||||
|
||||
if not args or args[0] == "-h" or args[0] == "--help":
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
import argparse
|
||||
|
||||
|
||||
class CLIParser(argparse.ArgumentParser):
|
||||
class Parser(argparse.ArgumentParser):
|
||||
"""Parser responsible for parsing CLI arguments."""
|
||||
|
||||
def __init__(self):
|
|
@ -4,15 +4,15 @@ from unittest import TestCase, mock
|
|||
|
||||
import argparse
|
||||
|
||||
from src.delarte.cli_parser import CLIParser
|
||||
from src.delarte.cli import Parser
|
||||
|
||||
|
||||
class TestCliParser(TestCase):
|
||||
class TestParser(TestCase):
|
||||
"""Tests for args parser."""
|
||||
|
||||
def setUp(self):
|
||||
"""Create a CLI Parser."""
|
||||
self.parser = CLIParser()
|
||||
self.parser = Parser()
|
||||
|
||||
def tearDown(self):
|
||||
"""Delete the CLI Parser."""
|
Loading…
Reference in New Issue