From 3b3c690ae33b687c8e87b7103efe9e5315fe25f0 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Sat, 11 Aug 2018 18:19:10 -0700 Subject: [PATCH] Remove return value from load_config, so no illusion of purity. This method already relies on object state anyway and writes back to self.config, so the return value is unnecessary. --- etiquette/photodb.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/etiquette/photodb.py b/etiquette/photodb.py index 00d5bfa..b3a7c34 100644 --- a/etiquette/photodb.py +++ b/etiquette/photodb.py @@ -1313,7 +1313,7 @@ class PhotoDB( # CONFIG self.config_filepath = self.data_directory.with_child(constants.DEFAULT_CONFIGNAME) - self.config = self.load_config() + self.load_config() self.log.setLevel(self.config['log_level']) # OTHER @@ -1542,8 +1542,6 @@ class PhotoDB( if needs_dump: self.save_config() - return config - def save_config(self): with open(self.config_filepath.absolute_path, 'w', encoding='utf-8') as handle: handle.write(json.dumps(self.config, indent=4, sort_keys=True))