Widen type hints to placate mypy
Apparently there's no way to specify a Sequence with fixed length, so Union it is!
This commit is contained in:
parent
6a585294e6
commit
3569096e89
@ -2,7 +2,7 @@
|
||||
Functionality for reading/writing elements (geometry, text labels,
|
||||
structure references) and associated properties.
|
||||
"""
|
||||
from typing import Dict, Tuple, Optional, BinaryIO, TypeVar, Type
|
||||
from typing import Dict, Tuple, Optional, BinaryIO, TypeVar, Type, Union
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from dataclasses import dataclass
|
||||
|
||||
@ -144,7 +144,7 @@ class Reference(Element):
|
||||
basis vectors to match it.
|
||||
"""
|
||||
|
||||
colrow: Optional[Tuple[int, int]]
|
||||
colrow: Optional[Union[Tuple[int, int], numpy.ndarray]]
|
||||
""" Number of columns and rows (AREF) or None (SREF) """
|
||||
|
||||
properties: Dict[int, bytes]
|
||||
|
Loading…
Reference in New Issue
Block a user