Skip to content

Commit 33b8bbd

Browse files
committedFeb 5, 2019
Astyle again
1 parent de5171a commit 33b8bbd

File tree

1 file changed

+16
-14
lines changed
  • python/plugins/db_manager/db_plugins/oracle

1 file changed

+16
-14
lines changed
 

‎python/plugins/db_manager/db_plugins/oracle/plugin.py

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ def connect(self, parent=None):
9191
uri = QgsDataSourceUri()
9292

9393
settingsList = ["host", "port", "database", "username", "password"]
94-
host, port, database, username, password = [settings.value(x, "", type=str) for x in settingsList]
94+
host, port, database, username, password = [
95+
settings.value(x, "", type=str) for x in settingsList]
9596

9697
# get all of the connexion options
9798

@@ -202,7 +203,8 @@ def toSqlLayer(self, sql, geomCol, uniqueCol,
202203
uri = self.uri()
203204
con = self.database().connector
204205

205-
uri.setDataSource(u"", u"({}\n)".format(sql), geomCol, filter, uniqueCol.strip(u'"'))
206+
uri.setDataSource(u"", u"({}\n)".format(
207+
sql), geomCol, filter, uniqueCol.strip(u'"'))
206208
if avoidSelectById:
207209
uri.disableSelectAtId(True)
208210
provider = self.dbplugin().providerName()
@@ -403,18 +405,18 @@ def getValidQgisUniqueFields(self, onlyOne=False):
403405
for idx in indexes:
404406
if idx.isUnique and len(idx.columns) == 1:
405407
fld = idx.fields()[idx.columns[0]]
406-
if (fld.dataType == u"NUMBER"
407-
and not fld.modifier
408-
and fld.notNull
409-
and fld not in ret):
408+
if (fld.dataType == u"NUMBER" and
409+
not fld.modifier and
410+
fld.notNull and
411+
fld not in ret):
410412
ret.append(fld)
411413

412414
# and finally append the other suitable fields
413415
for fld in self.fields():
414-
if (fld.dataType == u"NUMBER"
415-
and not fld.modifier
416-
and fld.notNull
417-
and fld not in ret):
416+
if (fld.dataType == u"NUMBER" and
417+
not fld.modifier and
418+
fld.notNull and
419+
fld not in ret):
418420
ret.append(fld)
419421

420422
if onlyOne:
@@ -514,14 +516,14 @@ def __init__(self, row, table):
514516

515517
# find out whether fields are part of primary key
516518
for con in self.table().constraints():
517-
if (con.type == ORTableConstraint.TypePrimaryKey
518-
and self.name == con.column):
519+
if (con.type == ORTableConstraint.TypePrimaryKey and
520+
self.name == con.column):
519521
self.primaryKey = True
520522
break
521523

522524
def type2String(self):
523-
if (u"TIMESTAMP" in self.dataType
524-
or self.dataType in [u"DATE", u"SDO_GEOMETRY",
525+
if (u"TIMESTAMP" in self.dataType or
526+
self.dataType in [u"DATE", u"SDO_GEOMETRY",
525527
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
526528
return u"{}".format(self.dataType)
527529
if self.charMaxLen in [None, -1]:

0 commit comments

Comments
 (0)
Please sign in to comment.