mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fixed issue related to extra semicolons and function naming convention reported by SonarQube.
This commit is contained in:
parent
db9d684524
commit
a1fd9ea3ce
@ -22,7 +22,7 @@ class GPDB(ServerType):
|
||||
def icon(self):
|
||||
return "gpdb.png"
|
||||
|
||||
def instanceOf(self, ver):
|
||||
def instance_of(self, ver):
|
||||
return "Greenplum Database" in ver
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ class PPAS(ServerType):
|
||||
" programs (pg_dump, pg_restore etc)."
|
||||
)
|
||||
|
||||
def instanceOf(self, ver):
|
||||
def instance_of(self, ver):
|
||||
return "EnterpriseDB" in ver
|
||||
|
||||
|
||||
|
@ -78,7 +78,7 @@ class ServerType(object):
|
||||
self.stype, self.desc, self.spriority
|
||||
)
|
||||
|
||||
def instanceOf(self, version):
|
||||
def instance_of(self, version):
|
||||
return True
|
||||
|
||||
@property
|
||||
|
@ -1032,7 +1032,7 @@ class Filemanager(object):
|
||||
return result
|
||||
|
||||
@staticmethod
|
||||
def getNewName(dir, path, newName, count=1):
|
||||
def get_new_name(dir, path, newName, count=1):
|
||||
"""
|
||||
Utility to provide new name for folder if file
|
||||
with same name already exists
|
||||
@ -1046,7 +1046,7 @@ class Filemanager(object):
|
||||
newPath = u"{}/{}{}_{}".format(dir, path, newName, last_char)
|
||||
if path_exists(newPath):
|
||||
count += 1
|
||||
return Filemanager.getNewName(dir, path, newName, count)
|
||||
return Filemanager.get_new_name(dir, path, newName, count)
|
||||
else:
|
||||
return newPath, newName
|
||||
|
||||
@ -1160,7 +1160,7 @@ class Filemanager(object):
|
||||
code = 0
|
||||
err_msg = gettext(u"Error: {0}").format(e.strerror)
|
||||
else:
|
||||
newPath, newName = self.getNewName(dir, path, name)
|
||||
newPath, newName = self.get_new_name(dir, path, name)
|
||||
try:
|
||||
os.mkdir(newPath)
|
||||
except Exception as e:
|
||||
|
@ -185,7 +185,7 @@
|
||||
}
|
||||
|
||||
.upload_file .file_upload_main {
|
||||
height: 127px;;
|
||||
height: 127px;
|
||||
width: 120px;
|
||||
display: inline-block;
|
||||
margin: 0 15px 15px 0 !important;
|
||||
@ -345,7 +345,7 @@ table.tablesorter {
|
||||
table.tablesorter {
|
||||
th:focus,
|
||||
tr:focus {
|
||||
border: 2px solid $input-focus-border-color !important;;
|
||||
border: 2px solid $input-focus-border-color !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@
|
||||
& .cm-link {color: $color-editor-fg;}
|
||||
|
||||
& :not(.cm-fat-cursor) .CodeMirror-cursor {
|
||||
border-left: thin solid $color-editor-fg;;
|
||||
border-left: thin solid $color-editor-fg;
|
||||
border-right: none;
|
||||
width: 0;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ table tr td {
|
||||
td.edit-cell:focus,
|
||||
td.delete-cell:focus,
|
||||
td.string-cell:focus {
|
||||
border: 2px solid $input-focus-border-color !important;;
|
||||
border: 2px solid $input-focus-border-color !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ $color-success-light: #D9ECDA !default;
|
||||
|
||||
$color-warning: #eea236 !default;
|
||||
$color-warning-fg: $black !default;
|
||||
$color-warning-light: #fce5c5 !default;;
|
||||
$color-warning-light: #fce5c5 !default;
|
||||
|
||||
$color-gray-dark: #848ea0 !default;
|
||||
$color-gray: #bac1cd !default;
|
||||
|
@ -509,7 +509,7 @@ WHERE
|
||||
server_types = ServerType.types()
|
||||
|
||||
for st in server_types:
|
||||
if st.instanceOf(manager.ver):
|
||||
if st.instance_of(manager.ver):
|
||||
manager.server_type = st.stype
|
||||
manager.server_cls = st
|
||||
break
|
||||
|
@ -264,7 +264,7 @@ WHERE db.oid = {0}""".format(did))
|
||||
|
||||
if self.ver and not self.server_type:
|
||||
for st in ServerType.types():
|
||||
if st.instanceOf(self.ver):
|
||||
if st.instance_of(self.ver):
|
||||
self.server_type = st.stype
|
||||
self.server_cls = st
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user