Skip to content

Commit

Permalink
refactor: Change variable initialization to be done in init method
Browse files Browse the repository at this point in the history
  • Loading branch information
junghoon-vans committed Nov 28, 2022
1 parent 75c6fb5 commit 3651018
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions varst/utils/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@
class Parser:
"""Parser class that parse arguments from cli"""

_parser = ArgumentParser()

input_file: str = ""
output_file: str = ""
sub_pairs: Dict[str, str] = {}

def __init__(self) -> None:
self._parser = ArgumentParser()
self.input_file: str = ""
self.output_file: str = ""
self.sub_pairs: Dict[str, str] = {}

self._parser.add_argument(
"name=value", nargs="*",
help="name-value pairs of substitutions",
Expand Down

0 comments on commit 3651018

Please sign in to comment.