Apply suggestions from @pshriwise code review

Co-authored-by: Patrick Shriwise <pshriwise@gmail.com>
This commit is contained in:
Paul Romano 2022-01-23 14:03:18 -06:00 committed by GitHub
parent 6bb6e2ec0c
commit ca58e14073
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 9 deletions

View file

@ -254,7 +254,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta):
filter_type = elem.get('type')
# If the filter type matches this class's short_name, then
# there is no overriden from_xml_element method.
# there is no overriden from_xml_element method
if filter_type == cls.short_name.lower():
# Get bins from element -- the default here works for any filters
# that just store a list of bins that can be represented as integers
@ -263,7 +263,7 @@ class Filter(IDManagerMixin, metaclass=FilterMeta):
return cls(bins, filter_id=filter_id)
# Search through all subclasses and find the one matching the HDF5
# 'type'. Call that class's from_hdf5 method.
# 'type'. Call that class's from_hdf5 method
for subclass in cls._recursive_subclasses():
if filter_type == subclass.short_name.lower():
return subclass.from_xml_element(elem, **kwargs)

View file

@ -290,11 +290,11 @@ class RectilinearMesh(Mesh):
Parameters
----------
x_grid : iterable of float
Mesh boundary points along the x-axis.
Mesh boundary points along the x-axis
y_grid : iterable of float
Mesh boundary points along the y-axis.
Mesh boundary points along the y-axis
z_grid : iterable of float
Mesh boundary points along the z-axis.
Mesh boundary points along the z-axis
"""
nx = len(x_grid)

View file

@ -88,7 +88,7 @@ class Trigger(EqualityMixin):
element.set("type", self._trigger_type)
element.set("threshold", str(self._threshold))
if len(self._scores) != 0:
element.set("scores", ' '.join(map(str, self._scores)))
element.set("scores", ' '.join(self._scores))
return element
@classmethod

View file

@ -1001,7 +1001,7 @@ double CylindricalMesh::find_r_crossing(
double CylindricalMesh::find_phi_crossing(
const Position& r, const Direction& u, double l, int shell) const
{
// Phi grid is [0, 2pi], thus there is no real surface to cross
// Phi grid is [0, 2π], thus there is no real surface to cross
if (full_phi_ && (shape_[1] == 1))
return INFTY;
@ -1221,7 +1221,7 @@ double SphericalMesh::find_r_crossing(
double SphericalMesh::find_theta_crossing(
const Position& r, const Direction& u, double l, int shell) const
{
// Theta grid is [0, pi], thus there is no real surface to cross
// Theta grid is [0, π], thus there is no real surface to cross
if (full_theta_ && (shape_[1] == 1))
return INFTY;
@ -1283,7 +1283,7 @@ double SphericalMesh::find_theta_crossing(
double SphericalMesh::find_phi_crossing(
const Position& r, const Direction& u, double l, int shell) const
{
// Phi grid is [0, 2pi], thus there is no real surface to cross
// Phi grid is [0, 2π], thus there is no real surface to cross
if (full_phi_ && (shape_[2] == 1))
return INFTY;