From 93091b6bd2a904fb7564da7ab9109d0562179041 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 31 Mar 2022 02:18:30 +0000 Subject: [PATCH] appeased pylint in config.py attr lookup --- src/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index 44ef673..468ddc1 100644 --- a/src/config.py +++ b/src/config.py @@ -198,9 +198,9 @@ class Configuration: "competition": self.config["variable"]["competition"], "modules": self.config["variable"]["modules"] } - if name in attr_lookup.keys(): + try: return attr_lookup[name] - else: + except KeyError: return None def __getitem__(self, key):