@@ -265,22 +265,22 @@ def add_kinetics_parameters_tallies(self, num_groups: int | None = None):
265265 denom_tally = openmc .Tally (name = 'IFP denominator' )
266266 denom_tally .scores = ['ifp-denominator' ]
267267 self .tallies .append (denom_tally )
268-
269- # TODO: This should also be incorporated into lower-level calls in
268+
269+ # TODO: This should also be incorporated into lower-level calls in
270270 # settings.py, but it requires information about the tallies currently
271271 # on the active Model
272272 def _assign_fw_cadis_tally_IDs (self ):
273- # Verify that all tallies assigned as targets on WeightWindowGenerators
274- # exist within model.tallies. If this is the case, convert the .targets
273+ # Verify that all tallies assigned as targets on WeightWindowGenerators
274+ # exist within model.tallies. If this is the case, convert the .targets
275275 # attribute of each WeightWindowGenerator to a sequence of tally IDs.
276276 if len (self .settings .weight_window_generators ) == 0 :
277277 return
278-
278+
279279 # List of valid tally IDs
280280 reference_tally_ids = np .asarray ([tal .id for tal in self .tallies ])
281-
281+
282282 for wwg in self .settings .weight_window_generators :
283- # Only proceeds if the "targets" attribute is an openmc.Tallies,
283+ # Only proceeds if the "targets" attribute is an openmc.Tallies,
284284 # which means it hasn't been checked against model.tallies.
285285 if isinstance (wwg .targets , openmc .Tallies ):
286286 id_vec = []
@@ -291,7 +291,7 @@ def _assign_fw_cadis_tally_IDs(self):
291291 if tal == reference_tal :
292292 id_next = reference_tal .id
293293 break
294-
294+
295295 if id_next == None :
296296 raise RuntimeError (
297297 f'Local FW-CADIS target tally { tal .id } not found on model.tallies!' )
@@ -1750,8 +1750,8 @@ def differentiate_mats(self, diff_volume_method: str = None, depletable_only: bo
17501750 def _auto_generate_mgxs_lib (
17511751 model : openmc .model .model ,
17521752 groups : openmc .mgxs .EnergyGroups ,
1753- correction : str | none ,
1754- directory : pathlike ,
1753+ correction : str | None ,
1754+ directory : PathLike ,
17551755 ) -> openmc .mgxs .Library :
17561756 """
17571757 Automatically generate a multi-group cross section libray from a model
@@ -1958,7 +1958,7 @@ def _isothermal_infinite_media_mgxs(
19581958
19591959 # Set materials on the model
19601960 model .materials = [material ]
1961- if temperature != None :
1961+ if temperature is not None :
19621962 model .materials [- 1 ].temperature = temperature
19631963
19641964 # Settings
@@ -1985,7 +1985,7 @@ def _isothermal_infinite_media_mgxs(
19851985 mgxs_lib = Model ._auto_generate_mgxs_lib (
19861986 model , groups , correction , directory )
19871987
1988- if temperature != None :
1988+ if temperature is not None :
19891989 return mgxs_lib .get_xsdata (domain = material , xsdata_name = name ,
19901990 temperature = temperature )
19911991 else :
@@ -2058,12 +2058,12 @@ def _generate_infinite_medium_mgxs(
20582058 )
20592059
20602060 temp_settings = {}
2061- if temperature_settings == None :
2061+ if temperature_settings is None :
20622062 temp_settings = self .settings .temperature
20632063 else :
20642064 temp_settings = temperature_settings
20652065
2066- if temperatures == None :
2066+ if temperatures is None :
20672067 mgxs_sets = []
20682068 for material in self .materials :
20692069 xs_data = Model ._isothermal_infinite_media_mgxs (
@@ -2236,7 +2236,7 @@ def _isothermal_stochastic_slab_mgxs(
22362236 model = openmc .Model ()
22372237 model .geometry = stoch_geom
22382238
2239- if temperature != None :
2239+ if temperature is not None :
22402240 for material in model .geometry .get_all_materials ().values ():
22412241 material .temperature = temperature
22422242
@@ -2260,7 +2260,7 @@ def _isothermal_stochastic_slab_mgxs(
22602260 model , groups , correction , directory )
22612261
22622262 # Fetch all of the isothermal results.
2263- if temperature != None :
2263+ if temperature is not None :
22642264 return {
22652265 mat .name : mgxs_lib .get_xsdata (domain = mat , xsdata_name = mat .name ,
22662266 temperature = temperature )
@@ -2346,12 +2346,12 @@ def _generate_stochastic_slab_mgxs(
23462346 )
23472347
23482348 temp_settings = {}
2349- if temperature_settings == None :
2349+ if temperature_settings is None :
23502350 temp_settings = self .settings .temperature
23512351 else :
23522352 temp_settings = temperature_settings
23532353
2354- if temperatures == None :
2354+ if temperatures is None :
23552355 mgxs_sets = Model ._isothermal_stochastic_slab_mgxs (
23562356 geo ,
23572357 groups ,
@@ -2444,7 +2444,7 @@ def _isothermal_materialwise_mgxs(
24442444 model = copy .deepcopy (input_model )
24452445 model .tallies = openmc .Tallies ()
24462446
2447- if temperature != None :
2447+ if temperature is not None :
24482448 for material in model .geometry .get_all_materials ().values ():
24492449 material .temperature = temperature
24502450
@@ -2460,7 +2460,7 @@ def _isothermal_materialwise_mgxs(
24602460 model , groups , correction , directory )
24612461
24622462 # Fetch all of the isothermal results.
2463- if temperature != None :
2463+ if temperature is not None :
24642464 return {
24652465 mat .name : mgxs_lib .get_xsdata (domain = mat , xsdata_name = mat .name ,
24662466 temperature = temperature )
@@ -2515,12 +2515,12 @@ def _generate_material_wise_mgxs(
25152515 entries in openmc.Settings.temperature_settings.
25162516 """
25172517 temp_settings = {}
2518- if temperature_settings == None :
2518+ if temperature_settings is None :
25192519 temp_settings = self .settings .temperature
25202520 else :
25212521 temp_settings = temperature_settings
25222522
2523- if temperatures == None :
2523+ if temperatures is None :
25242524 mgxs_sets = Model ._isothermal_materialwise_mgxs (
25252525 self ,
25262526 groups ,
0 commit comments