mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06: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
@@ -120,7 +120,7 @@ class Driver(BaseDriver):
|
||||
|
||||
return managers[str(sid)]
|
||||
|
||||
def version(cls):
|
||||
def version(self):
|
||||
"""
|
||||
version(...)
|
||||
|
||||
@@ -135,7 +135,7 @@ class Driver(BaseDriver):
|
||||
"Driver Version information for psycopg2 is not available!"
|
||||
)
|
||||
|
||||
def libpq_version(cls):
|
||||
def libpq_version(self):
|
||||
"""
|
||||
Returns the loaded libpq version
|
||||
"""
|
||||
|
@@ -50,15 +50,15 @@ class DriverRegistry(ABCMeta):
|
||||
registry = None
|
||||
drivers = dict()
|
||||
|
||||
def __init__(cls, name, bases, d):
|
||||
def __init__(self, name, bases, d):
|
||||
|
||||
# Register this type of driver, based on the module name
|
||||
# Avoid registering the BaseDriver itself
|
||||
|
||||
if name != 'BaseDriver':
|
||||
DriverRegistry.registry[_decorate_cls_name(d['__module__'])] = cls
|
||||
DriverRegistry.registry[_decorate_cls_name(d['__module__'])] = self
|
||||
|
||||
ABCMeta.__init__(cls, name, bases, d)
|
||||
ABCMeta.__init__(self, name, bases, d)
|
||||
|
||||
@classmethod
|
||||
def create(cls, name, **kwargs):
|
||||
|
Reference in New Issue
Block a user