Replaced is and is not
This commit is contained in:
@@ -123,7 +123,7 @@ class Simulation(Base):
|
||||
def __repr__(self):
|
||||
attrs = []
|
||||
for attr, val in self.__dict__.items():
|
||||
if attr[0] is not '_' and attr is not 'type':
|
||||
if attr[0] != '_' and attr != 'type':
|
||||
attrs.append('{}={}'.format(attr, val))
|
||||
return '<{classname}({attributes})>'.format(classname=self.__class__.__name__, attributes=', '.join(attrs))
|
||||
|
||||
@@ -208,7 +208,7 @@ class Evaluation(Base):
|
||||
def __repr__(self):
|
||||
attrs = []
|
||||
for attr, val in self.__dict__.items():
|
||||
if attr[0] is not '_' and attr not in ['type', 'data']:
|
||||
if attr[0] != '_' and attr not in ['type', 'data']:
|
||||
attrs.append('{}={}'.format(attr, val))
|
||||
return '<{classname}({attributes})>'.format(classname=self.__class__.__name__, attributes=', '.join(attrs))
|
||||
|
||||
@@ -227,7 +227,7 @@ def float_query(value, dbattr):
|
||||
crit = dbattr == float(value)
|
||||
elif isinstance(value, str):
|
||||
limits = value.split('-')
|
||||
if len(limits) is 2:
|
||||
if len(limits) == 2:
|
||||
try:
|
||||
limits = [float(x) for x in limits]
|
||||
except:
|
||||
|
||||
Reference in New Issue
Block a user