diff --git a/openmc/plotter.py b/openmc/plotter.py index c3b951ad89..85c4963a76 100644 --- a/openmc/plotter.py +++ b/openmc/plotter.py @@ -1,6 +1,3 @@ -# annotations package is required to enable postponed evaluation of type -# hints in conjugation with the | operator. This avoids TypeError: -# unsupported operand type(s) for |: 'str' and 'NoneType' error from __future__ import annotations from itertools import chain from numbers import Integral, Real @@ -126,7 +123,7 @@ def _get_title(reactions): def plot_xs( - reactions: Dict[str, openmc.Material | List[str]], + reactions: Dict[str | openmc.Material, List[str]], divisor_types: Iterable[str] | None = None, temperature: float = 294.0, axis: "plt.Axes" | None = None, @@ -139,7 +136,7 @@ def plot_xs( divisor_orders: Iterable[int] | None = None, energy_axis_units: str = "eV", **kwargs, -) -> "plt.Figure": +) -> "plt.Figure" | None: """Creates a figure of continuous-energy cross sections for this item. Parameters @@ -291,7 +288,6 @@ def plot_xs( return fig - def calculate_cexs(this, types, temperature=294., sab_name=None, cross_sections=None, enrichment=None, ncrystal_cfg=None): """Calculates continuous-energy cross sections of a requested type.