Replaced is and is not

This commit is contained in:
sebastiankloth
2022-04-11 15:38:09 +02:00
parent 4fb80d9d44
commit f643edd405
3 changed files with 5 additions and 5 deletions

View File

@@ -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: