mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix plot_xs type hint (#3184)
This commit is contained in:
parent
7552123c76
commit
339d78c5fa
1 changed files with 2 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue