pep8 fixes

This commit is contained in:
yardasol 2022-04-07 19:01:09 -05:00
parent 8e1880b01c
commit e53be38712
2 changed files with 7 additions and 7 deletions

View file

@ -6,6 +6,7 @@ import numpy as np
import openmc
from openmc.checkvalue import check_greater_than, check_value
class CompositeSurface(ABC):
"""Multiple primitive surfaces combined into a composite surface"""
@ -92,7 +93,7 @@ class CylinderSector(CompositeSurface):
"""
_surface_names = ('outer_cyl','inner_cyl',
_surface_names = ('outer_cyl', 'inner_cyl',
'plane0', 'plane1')
def __init__(self, center, r1, r2, theta0, theta, axis='z', **kwargs):
@ -132,7 +133,7 @@ class CylinderSector(CompositeSurface):
**kwargs)
def __neg__(self):
return -self.outer_cyl & +self.inner_cyl & -self.plane0 & +self.plane1
return -self.outer_cyl & +self.inner_cyl & -self.plane0 & +self.plane1
def __pos__(self):
return +self.outer_cyl | -self.inner_cyl | +self.plane0 | -self.plane1
@ -206,10 +207,10 @@ class IsogonalOctagon(CompositeSurface):
# Side lengths
if r2 > r1 * sqrt(2):
raise ValueError(f'r2 is greater than sqrt(2) * r1. Octagon' + \
raise ValueError(f'r2 is greater than sqrt(2) * r1. Octagon' +
' may be erroneous.')
if r1 > r2 * sqrt(2):
raise ValueError(f'r1 is greater than sqrt(2) * r2. Octagon' + \
raise ValueError(f'r1 is greater than sqrt(2) * r2. Octagon' +
' may be erroneous.')
L_basis_ax = (r2 * sqrt(2) - r1)

View file

@ -12,7 +12,8 @@ def test_rectangular_parallelepiped():
ymax = ymin + uniform(0., 5.)
zmin = uniform(-5., 5.)
zmax = zmin + uniform(0., 5.)
s = openmc.model.RectangularParallelepiped(xmin, xmax, ymin, ymax, zmin, zmax)
s = openmc.model.RectangularParallelepiped(
xmin, xmax, ymin, ymax, zmin, zmax)
assert isinstance(s.xmin, openmc.XPlane)
assert isinstance(s.xmax, openmc.XPlane)
assert isinstance(s.ymin, openmc.YPlane)
@ -286,5 +287,3 @@ def test_isogonal_octagon(axis, plane_tb, plane_lr, axis_idx):
# Make sure repr works
repr(s)