Respond to @wbinventor comments on #679

This commit is contained in:
Paul Romano 2016-07-02 15:21:58 +07:00
parent c7a0b716d2
commit b483cfe0b6
5 changed files with 13 additions and 13 deletions

View file

@ -45,9 +45,9 @@ class Element(object):
def __eq__(self, other):
if isinstance(other, Element):
if self._name != other.name:
if self.name != other.name:
return False
elif self._xs != other.xs:
elif self.xs != other.xs:
return False
else:
return True

View file

@ -38,9 +38,9 @@ class Macroscopic(object):
def __eq__(self, other):
if isinstance(other, Macroscopic):
if self._name != other.name:
if self.name != other.name:
return False
elif self._xs != other.xs:
elif self.xs != other.xs:
return False
else:
return True

View file

@ -352,9 +352,9 @@ class Material(object):
if self._macroscopic is None:
self._macroscopic = macroscopic
else:
msg = 'Unable to add a Macroscopic to Material ID="{0}", ' \
msg = 'Unable to add a Macroscopic to Material ID="{0}". ' \
'Only one Macroscopic allowed per ' \
'Material!'.format(self._id)
'Material.'.format(self._id)
raise ValueError(msg)
# Generally speaking, the density for a macroscopic object will

View file

@ -296,7 +296,7 @@ class Library(object):
if correction == 'P0' and self.legendre_order > 0:
warn('The P0 correction will be ignored since the scattering '
'order {} is greater than zero'.format(self.legendre_order))
'order "{}" is greater than zero'.format(self.legendre_order))
self._correction = correction
@ -1176,11 +1176,11 @@ class Library(object):
# Ensure absorption is present
if 'absorption' not in self.mgxs_types:
error_flag = True
warn('"absorption" MGXS type is required but not provided.')
warn('An "absorption" MGXS type is required but not provided.')
# Ensure nu-scattering matrix is required
if 'nu-scatter matrix' not in self.mgxs_types:
error_flag = True
warn('"nu-scatter matrix" MGXS type is required but not provided.')
warn('A "nu-scatter matrix" MGXS type is required but not provided.')
else:
# Ok, now see the status of scatter and/or multiplicity
if ((('scatter matrix' not in self.mgxs_types) and
@ -1189,7 +1189,7 @@ class Library(object):
# we need total, and not transport.
if 'total' not in self.mgxs_types:
error_flag = True
warn('"total" MGXS type is required if a '
warn('A "total" MGXS type is required if a '
'scattering matrix is not provided.')
# Total or transport can be present, but if using
# self.correction=="P0", then we should use transport.
@ -1202,7 +1202,7 @@ class Library(object):
elif (((self.correction is None) and
('total' not in self.mgxs_types))):
error_flag = True
warn('"total" MGXS type is required, but not provided.')
warn('A "total" MGXS type is required, but not provided.')
if error_flag:
raise ValueError('Invalid MGXS configuration encountered.')

View file

@ -46,9 +46,9 @@ class Nuclide(object):
def __eq__(self, other):
if isinstance(other, Nuclide):
if self._name != other.name:
if self.name != other.name:
return False
elif self._xs != other.xs:
elif self.xs != other.xs:
return False
else:
return True