Skip to content

Commit de5171a

Browse files
committed
Code style (I had autopep8 installed btw)
1 parent cd6ce76 commit de5171a

File tree

1 file changed

+13
-13
lines changed
  • python/plugins/db_manager/db_plugins/oracle

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -403,18 +403,18 @@ def getValidQgisUniqueFields(self, onlyOne=False):
403403
for idx in indexes:
404404
if idx.isUnique and len(idx.columns) == 1:
405405
fld = idx.fields()[idx.columns[0]]
406-
if (fld.dataType == u"NUMBER" and
407-
not fld.modifier and
408-
fld.notNull and
409-
fld not in ret):
406+
if (fld.dataType == u"NUMBER"
407+
and not fld.modifier
408+
and fld.notNull
409+
and fld not in ret):
410410
ret.append(fld)
411411

412412
# and finally append the other suitable fields
413413
for fld in self.fields():
414-
if (fld.dataType == u"NUMBER" and
415-
not fld.modifier and
416-
fld.notNull and
417-
fld not in ret):
414+
if (fld.dataType == u"NUMBER"
415+
and not fld.modifier
416+
and fld.notNull
417+
and fld not in ret):
418418
ret.append(fld)
419419

420420
if onlyOne:
@@ -514,15 +514,15 @@ def __init__(self, row, table):
514514

515515
# find out whether fields are part of primary key
516516
for con in self.table().constraints():
517-
if (con.type == ORTableConstraint.TypePrimaryKey and
518-
self.name == con.column):
517+
if (con.type == ORTableConstraint.TypePrimaryKey
518+
and self.name == con.column):
519519
self.primaryKey = True
520520
break
521521

522522
def type2String(self):
523-
if (u"TIMESTAMP" in self.dataType or
524-
self.dataType in [u"DATE", u"SDO_GEOMETRY",
525-
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
523+
if (u"TIMESTAMP" in self.dataType
524+
or self.dataType in [u"DATE", u"SDO_GEOMETRY",
525+
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
526526
return u"{}".format(self.dataType)
527527
if self.charMaxLen in [None, -1]:
528528
return u"{}".format(self.dataType)

0 commit comments

Comments
 (0)