From 55b4df553c43cc0d25645621cac6927ba2e287c7 Mon Sep 17 00:00:00 2001 From: christinacai123 <63215816+christinacai123@users.noreply.github.com> Date: Sat, 15 Apr 2023 15:54:41 -0400 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Paul Romano --- openmc/model/model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openmc/model/model.py b/openmc/model/model.py index 1da6b3bf29..ba44777dd2 100644 --- a/openmc/model/model.py +++ b/openmc/model/model.py @@ -8,7 +8,7 @@ from numbers import Integral from tempfile import NamedTemporaryFile import warnings from xml.etree import ElementTree as ET -from typing import Optional +from typing import Optional, Dict import h5py @@ -141,7 +141,7 @@ class Model: @property @lru_cache(maxsize=None) - def _cells_by_name(self) -> dict: + def _cells_by_name(self) -> Dict[int, openmc.Cell]: # Get the names maps, but since names are not unique, store a set for # each name key. In this way when the user requests a change by a name, # the change will be applied to all of the same name. @@ -154,7 +154,7 @@ class Model: @property @lru_cache(maxsize=None) - def _materials_by_name(self) -> dict: + def _materials_by_name(self) -> Dict[int, openmc.Material]: if self.materials is None: mats = self.geometry.get_all_materials().values() else: