From b483cfe0b64bd6a77c2bc06e02b46b9a48630a33 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Sat, 2 Jul 2016 15:21:58 +0700 Subject: [PATCH] Respond to @wbinventor comments on #679 --- openmc/element.py | 4 ++-- openmc/macroscopic.py | 4 ++-- openmc/material.py | 4 ++-- openmc/mgxs/library.py | 10 +++++----- openmc/nuclide.py | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/openmc/element.py b/openmc/element.py index 2e22702d99..c877c27a12 100644 --- a/openmc/element.py +++ b/openmc/element.py @@ -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 diff --git a/openmc/macroscopic.py b/openmc/macroscopic.py index 1fdf875e72..1dd087903f 100644 --- a/openmc/macroscopic.py +++ b/openmc/macroscopic.py @@ -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 diff --git a/openmc/material.py b/openmc/material.py index 1ba8f533a9..d7ffd04e94 100644 --- a/openmc/material.py +++ b/openmc/material.py @@ -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 diff --git a/openmc/mgxs/library.py b/openmc/mgxs/library.py index 319e4d4139..9df9d150dd 100644 --- a/openmc/mgxs/library.py +++ b/openmc/mgxs/library.py @@ -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.') diff --git a/openmc/nuclide.py b/openmc/nuclide.py index a2130680fb..bfeff93113 100644 --- a/openmc/nuclide.py +++ b/openmc/nuclide.py @@ -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