mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 06:05:58 -04:00
corrected types from code review by @paulromano
Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
parent
3623408bc5
commit
375af321d8
1 changed files with 3 additions and 3 deletions
|
|
@ -4,7 +4,7 @@ from numbers import Real
|
|||
import warnings
|
||||
import typing # imported separately as py3.8 requires typing.Iterable
|
||||
# also required to prevent typing.Union namespace overwriting Union
|
||||
from typing import Optional
|
||||
from typing import Optional, Sequence
|
||||
from xml.etree import ElementTree as ET
|
||||
|
||||
import numpy as np
|
||||
|
|
@ -77,7 +77,7 @@ class Source:
|
|||
def __init__(
|
||||
self,
|
||||
space: Optional[openmc.stats.Spatial] = None,
|
||||
angle: Optional[openmc.stats.Spatial] = None,
|
||||
angle: Optional[openmc.stats.UnitSphere] = None,
|
||||
energy: Optional[openmc.stats.Univariate] = None,
|
||||
time: Optional[openmc.stats.Univariate] = None,
|
||||
filename: Optional[str] = None,
|
||||
|
|
@ -85,7 +85,7 @@ class Source:
|
|||
parameters: Optional[str] = None,
|
||||
strength: float = 1.0,
|
||||
particle: str = 'neutron',
|
||||
domains: Optional[typing.Union[openmc.Cell, openmc.Material, openmc.Universe]] = None
|
||||
domains: Optional[Sequence[typing.Union[openmc.Cell, openmc.Material, openmc.Universe]]] = None
|
||||
):
|
||||
self._space = None
|
||||
self._angle = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue