diff options
author | Anthon van der Neut <anthon@mnt.org> | 2019-08-15 22:37:48 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2019-08-15 22:37:48 +0200 |
commit | 909171f93bbad505d35f2856e0105f173858ea5f (patch) | |
tree | 2f60cc5be35af933c2c3267694e0a712cf29578b /compat.py | |
parent | 1c628953c71f2e2f0cd01d643ca239e23c2e15cc (diff) | |
download | ruamel.yaml-909171f93bbad505d35f2856e0105f173858ea5f.tar.gz |
mypy, split contruct_object0.16.3
fixes issue #306
*When this change indeed resolves your problem, please **Close** this issue*.
*(You can do so using the WorkFlow pull-down (close to the top right of this page))*
Diffstat (limited to 'compat.py')
-rw-r--r-- | compat.py | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -13,7 +13,8 @@ from abc import abstractmethod # fmt: off if False: # MYPY - from typing import Any, Dict, Optional, List, Union, BinaryIO, IO, Text, Tuple, Optional # NOQA + from typing import Any, Dict, Optional, List, Union, BinaryIO, IO, Text, Tuple # NOQA + from typing import Optional # NOQA # fmt: on _DEFAULT_YAML_VERSION = (1, 2) @@ -106,7 +107,7 @@ else: binary_type = str # to allow importing - unichr = unichr # type: ignore + unichr = unichr from StringIO import StringIO as _StringIO StringIO = _StringIO @@ -122,7 +123,7 @@ if False: # MYPY # StreamType = Union[BinaryIO, IO[str], StringIO] # type: ignore StreamType = Any - StreamTextType = Union[Text, StreamType] + StreamTextType = StreamType # Union[Text, StreamType] VersionType = Union[List[int], str, Tuple[int, int]] if PY3: |