mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
Enforce sequence type when setting Setting.track (#3071)
This commit is contained in:
parent
1b22dd28d4
commit
b11f8b73ca
1 changed files with 2 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
|||
from collections.abc import Iterable, Mapping, MutableSequence
|
||||
from collections.abc import Iterable, Mapping, MutableSequence, Sequence
|
||||
from enum import Enum
|
||||
import itertools
|
||||
from math import ceil
|
||||
|
|
@ -819,7 +819,7 @@ class Settings:
|
|||
|
||||
@track.setter
|
||||
def track(self, track: typing.Iterable[typing.Iterable[int]]):
|
||||
cv.check_type('track', track, Iterable)
|
||||
cv.check_type('track', track, Sequence)
|
||||
for t in track:
|
||||
if len(t) != 3:
|
||||
msg = f'Unable to set the track to "{t}" since its length is not 3'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue