diff --git a/config.py b/config.py index a0f45d20..5830fe78 100644 --- a/config.py +++ b/config.py @@ -14,7 +14,7 @@ class Config: self._config_json: dict = ujson.load(f) self.DEBUG = self.get_config("debug") - if type(self.DEBUG) != bool: + if not isinstance(self.DEBUG, bool): self.DEBUG = False self.ADMINISTRATORS = self.get_config("administrators") self.MYSQL = self.get_config("mysql") diff --git a/manager.py b/manager.py index e5f3819e..949f8b34 100644 --- a/manager.py +++ b/manager.py @@ -38,9 +38,9 @@ class PluginsManager: self.plugin_list.append(root) def add_exclude(self, exclude: Union[str, List[str]]): - if type(exclude) == str: + if isinstance(exclude, str): self.exclude_list.append(exclude) - elif type(exclude) == list: + elif isinstance(exclude, list): self.exclude_list.extend(exclude) else: raise TypeError