diff --git a/interfaces/cython/cantera/composite.py b/interfaces/cython/cantera/composite.py index 5ca7e12907..55cad77eb7 100644 --- a/interfaces/cython/cantera/composite.py +++ b/interfaces/cython/cantera/composite.py @@ -263,10 +263,10 @@ def __rmul__(self, other): return Quantity(self.phase, mass=self.mass * other, constant=self.constant) def __iadd__(self, other): - if (self._id != other._id): + if self._id != other._id: raise ValueError('Cannot add Quantities with different phase ' 'definitions.') - assert(self.constant == other.constant) + assert self.constant == other.constant a1,b1 = getattr(self.phase, self.constant) a2,b2 = getattr(other.phase, self.constant) m = self.mass + other.mass diff --git a/interfaces/cython/cantera/cti2yaml.py b/interfaces/cython/cantera/cti2yaml.py index 8c44aba118..4ef33129db 100644 --- a/interfaces/cython/cantera/cti2yaml.py +++ b/interfaces/cython/cantera/cti2yaml.py @@ -1541,7 +1541,7 @@ def convert(filename=None, output_name=None, text=None): if filename is None and text is None: raise ValueError("One of filename or text must be specified") - elif (filename is not None and text is not None): + elif filename is not None and text is not None: raise ValueError("Only one of filename or text should be specified") if filename is not None: diff --git a/interfaces/cython/cantera/examples/reactors/NonIdealShockTube.py b/interfaces/cython/cantera/examples/reactors/NonIdealShockTube.py index 80645c7635..1dc9645a87 100644 --- a/interfaces/cython/cantera/examples/reactors/NonIdealShockTube.py +++ b/interfaces/cython/cantera/examples/reactors/NonIdealShockTube.py @@ -92,7 +92,7 @@ def ignitionDelay(states, species): t = 0 counter = 1 -while(t < estimatedIgnitionDelayTime): +while t < estimatedIgnitionDelayTime: t = reactorNetwork.step() if counter % 20 == 0: # We will save only every 20th value. Otherwise, this takes too long @@ -130,7 +130,7 @@ def ignitionDelay(states, species): t = 0 counter = 1 -while(t < estimatedIgnitionDelayTime): +while t < estimatedIgnitionDelayTime: t = reactorNetwork.step() if counter % 20 == 0: # We will save only every 20th value. Otherwise, this takes too long