Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Code style (I had autopep8 installed btw)
  • Loading branch information
elpaso committed Feb 5, 2019
1 parent cd6ce76 commit de5171a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions python/plugins/db_manager/db_plugins/oracle/plugin.py
Expand Up @@ -403,18 +403,18 @@ def getValidQgisUniqueFields(self, onlyOne=False):
for idx in indexes:
if idx.isUnique and len(idx.columns) == 1:
fld = idx.fields()[idx.columns[0]]
if (fld.dataType == u"NUMBER" and
not fld.modifier and
fld.notNull and
fld not in ret):
if (fld.dataType == u"NUMBER"
and not fld.modifier
and fld.notNull
and fld not in ret):
ret.append(fld)

# and finally append the other suitable fields
for fld in self.fields():
if (fld.dataType == u"NUMBER" and
not fld.modifier and
fld.notNull and
fld not in ret):
if (fld.dataType == u"NUMBER"
and not fld.modifier
and fld.notNull
and fld not in ret):
ret.append(fld)

if onlyOne:
Expand Down Expand Up @@ -514,15 +514,15 @@ def __init__(self, row, table):

# find out whether fields are part of primary key
for con in self.table().constraints():
if (con.type == ORTableConstraint.TypePrimaryKey and
self.name == con.column):
if (con.type == ORTableConstraint.TypePrimaryKey
and self.name == con.column):
self.primaryKey = True
break

def type2String(self):
if (u"TIMESTAMP" in self.dataType or
self.dataType in [u"DATE", u"SDO_GEOMETRY",
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
if (u"TIMESTAMP" in self.dataType
or self.dataType in [u"DATE", u"SDO_GEOMETRY",
u"BINARY_FLOAT", u"BINARY_DOUBLE"]):
return u"{}".format(self.dataType)
if self.charMaxLen in [None, -1]:
return u"{}".format(self.dataType)
Expand Down

0 comments on commit de5171a

Please sign in to comment.