Skip to content

Commit

Permalink
Remove some un-Pythonic parentheses
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Jan 11, 2020
1 parent 961b501 commit 9ac5da2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions interfaces/cython/cantera/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion interfaces/cython/cantera/cti2yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9ac5da2

Please sign in to comment.