mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-09-03 20:52:57 -05:00
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:
committed by
Akshay Joshi
parent
dd7eb54e90
commit
56cf64ad22
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user