mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed following SonarQube issues:
1. Method/Field names should comply with a naming convention. 2. Conditionals should start on new lines
This commit is contained in:
@@ -67,7 +67,7 @@ class BaseDriver(object):
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
def gc(self):
|
||||
def gc_timeout(self):
|
||||
pass
|
||||
|
||||
|
||||
|
@@ -197,7 +197,7 @@ class Driver(BaseDriver):
|
||||
str(sid) in self.managers[session.sid]:
|
||||
del self.managers[session.sid][str(sid)]
|
||||
|
||||
def gc(self):
|
||||
def gc_timeout(self):
|
||||
"""
|
||||
Release the connections for the sessions, which have not pinged the
|
||||
server for more than config.MAX_SESSION_IDLE_TIME.
|
||||
|
@@ -148,24 +148,24 @@ class ServerManager(object):
|
||||
|
||||
return res
|
||||
|
||||
def ServerVersion(self):
|
||||
def server_version(self):
|
||||
return self.ver
|
||||
|
||||
@property
|
||||
def version(self):
|
||||
return self.sversion
|
||||
|
||||
def MajorVersion(self):
|
||||
def major_version(self):
|
||||
if self.sversion is not None:
|
||||
return int(self.sversion / 10000)
|
||||
raise Exception(gettext("Information is not available."))
|
||||
|
||||
def MinorVersion(self):
|
||||
def minor_version(self):
|
||||
if self.sversion:
|
||||
return int(int(self.sversion / 100) % 100)
|
||||
raise Exception(gettext("Information is not available."))
|
||||
|
||||
def PatchVersion(self):
|
||||
def patch_version(self):
|
||||
if self.sversion:
|
||||
return int(int(self.sversion / 100) / 100)
|
||||
raise Exception(gettext("Information is not available."))
|
||||
|
Reference in New Issue
Block a user