Refactor method name

This commit is contained in:
Dimitris Zlatanidis 2022-12-31 21:56:14 +02:00
parent c3a6562626
commit 110a9405a7

View file

@ -58,7 +58,7 @@ class FormConfigs:
def help(self):
""" Load the configuration file on a text box. """
self.read_file()
self.read_config()
self.dialog.textbox(str(self.config_file), 40, 60)
self.edit()
@ -70,14 +70,14 @@ class FormConfigs:
return False
return True
def read_file(self):
def read_config(self):
""" Read the original config file. """
with open(self.config_file, 'r') as toml_file:
self.orig_configs = toml_file.readlines()
def write_file(self, configs: dict, tags: list):
""" Write the new values to the config file. """
self.read_file()
self.read_config()
with open(self.config_file, 'w') as patch_toml:
for line in self.orig_configs:
for key, value in zip(configs['configs'].keys(), tags):