From e98f21e1f3e4a0c2fd71037b2c7494ae10296c04 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 25 Apr 2023 12:09:22 +0300 Subject: [PATCH] Updated for type hints --- slpkg/dialog_configs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slpkg/dialog_configs.py b/slpkg/dialog_configs.py index 38bb294b..b8c2fd1d 100644 --- a/slpkg/dialog_configs.py +++ b/slpkg/dialog_configs.py @@ -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)