Refactor method name

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

View file

@ -58,7 +58,7 @@ class FormConfigs:
def help(self):
""" Load the configuration file on a text box. """
self.read_config()
self.read_configs()
self.dialog.textbox(str(self.config_file), 40, 60)
self.edit()
@ -70,14 +70,14 @@ class FormConfigs:
return False
return True
def read_config(self):
def read_configs(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_config()
self.read_configs()
with open(self.config_file, 'w') as patch_toml:
for line in self.orig_configs:
for key, value in zip(configs['configs'].keys(), tags):