diff --git a/iota/types.py b/iota/types.py index a4c3cf1..799aaa1 100644 --- a/iota/types.py +++ b/iota/types.py @@ -3,7 +3,7 @@ from itertools import chain from math import ceil from random import SystemRandom -from typing import Any, AnyStr, Generator, Iterable, Iterator, List, \ +from typing import Any, Generator, Iterable, Iterator, List, \ MutableSequence, Optional, Type, TypeVar, Union, Dict from warnings import warn @@ -24,7 +24,7 @@ ] # Custom types for type hints and docstrings. -TrytesCompatible = Union[AnyStr, bytearray, 'TryteString'] +TrytesCompatible = Union[str, bytes, bytearray, 'TryteString'] T = TypeVar('T', bound='TryteString')