mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed code per comments by @paulromano
This commit is contained in:
parent
8094c283fe
commit
a4d20444f8
3 changed files with 6 additions and 6 deletions
|
|
@ -566,7 +566,7 @@ class AggregateScore(object):
|
|||
def name(self):
|
||||
|
||||
# Append each score in the aggregate to the string
|
||||
string = '(' + ', '.join(map(str, self.scores)) + ')'
|
||||
string = '(' + ', '.join(self.scores) + ')'
|
||||
return string
|
||||
|
||||
@scores.setter
|
||||
|
|
@ -742,7 +742,7 @@ class AggregateFilter(object):
|
|||
other.aggregate_filter.type in _FILTER_TYPES:
|
||||
delta = _FILTER_TYPES.index(self.aggregate_filter.type) - \
|
||||
_FILTER_TYPES.index(other.aggregate_filter.type)
|
||||
return True if delta > 0 else False
|
||||
return delta > 0
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class Filter(object):
|
|||
if self.type in _FILTER_TYPES and other.type in _FILTER_TYPES:
|
||||
delta = _FILTER_TYPES.index(self.type) - \
|
||||
_FILTER_TYPES.index(other.type)
|
||||
return True if delta > 0 else False
|
||||
return delta > 0
|
||||
else:
|
||||
return False
|
||||
else:
|
||||
|
|
@ -327,7 +327,7 @@ class Filter(object):
|
|||
|
||||
# Count bins in the merged filter
|
||||
if 'energy' in merged_filter.type:
|
||||
merged_filter.num_bins = len(merged_bins) -1
|
||||
merged_filter.num_bins = len(merged_bins) - 1
|
||||
else:
|
||||
merged_filter.num_bins = len(merged_bins)
|
||||
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class Geometry(object):
|
|||
all_cells = self._root_universe.get_all_cells()
|
||||
cells = set()
|
||||
|
||||
for cell_id, cell in all_cells.items():
|
||||
for cell in all_cells.values():
|
||||
if cell._type == 'normal':
|
||||
cells.add(cell)
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ class Geometry(object):
|
|||
all_universes = self._root_universe.get_all_universes()
|
||||
universes = set()
|
||||
|
||||
for universe_id, universe in all_universes.items():
|
||||
for universe in all_universes.values():
|
||||
universes.add(universe)
|
||||
|
||||
universes = list(universes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue