Fixed following SonarQube issues:

- Refactor functions to not always return the same value.
  - Rename "cls" to "self" or add the missing "self" parameter.
  - Remove useless assignment to variables.
This commit is contained in:
Aditya Toshniwal
2020-07-30 14:04:22 +05:30
committed by Akshay Joshi
parent dd7eb54e90
commit 56cf64ad22
17 changed files with 624 additions and 663 deletions
+3 -3
View File
@@ -45,15 +45,15 @@ class ObjectRegistry(ABCMeta):
registry = dict()
def __init__(cls, name, bases, d):
def __init__(self, name, bases, d):
"""
This method is used to register the objects based on object type.
"""
if d and 'object_type' in d:
ObjectRegistry.registry[d['object_type']] = cls
ObjectRegistry.registry[d['object_type']] = self
ABCMeta.__init__(cls, name, bases, d)
ABCMeta.__init__(self, name, bases, d)
@classmethod
def get_object(cls, name, **kwargs):