Updated for type hints

This commit is contained in:
Dimitris Zlatanidis 2023-04-25 12:09:22 +03:00
parent 48f45e7709
commit e98f21e1f3

View file

@ -19,7 +19,7 @@ class FormConfigs(Configs):
self.utils = Utilities()
self.orig_configs: list = []
self.config_file = Path(self.etc_path, f'{self.prog_name}.toml')
self.config_file: Path = Path(self.etc_path, f'{self.prog_name}.toml')
def is_dialog_enabled(self) -> None:
""" Checking if the dialog box is enabled by the user. """
@ -94,7 +94,7 @@ class FormConfigs(Configs):
def read_configs(self) -> None:
""" Read the original config file. """
with open(self.config_file, 'r') as toml_file:
self.orig_configs = toml_file.readlines()
self.orig_configs: list = toml_file.readlines()
def write_file(self, tags: list) -> None:
""" Write the new values to the config file. """
@ -116,6 +116,6 @@ class FormConfigs(Configs):
'ASK_QUESTION =',
'PARALLEL_DOWNLOADS =')
):
line = line.replace('"', '')
line: str = line.replace('"', '')
patch_toml.write(line)