diff options
author | Anthon van der Neut <anthon@mnt.org> | 2018-08-05 23:20:17 +0200 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2018-08-05 23:20:17 +0200 |
commit | bfd63d6184e3a43cb63e0831467819bc44513d50 (patch) | |
tree | 9426b3c93cb1fd7849ea678424b6bbd900ff2d68 /comments.py | |
parent | 893db272efb6d7041e09aa09f04da2010ec92072 (diff) | |
download | ruamel.yaml-bfd63d6184e3a43cb63e0831467819bc44513d50.tar.gz |
added context manager, mypy cleanup (w. Optional) added tests0.15.50
Diffstat (limited to 'comments.py')
-rw-r--r-- | comments.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/comments.py b/comments.py index 32ce8ce..84fecbc 100644 --- a/comments.py +++ b/comments.py @@ -21,7 +21,7 @@ else: from collections.abc import MutableSet, Sized, Set if False: # MYPY - from typing import Any, Dict, Optional, List, Union # NOQA + from typing import Any, Dict, Optional, List, Union, Optional # NOQA # fmt: off __all__ = ["CommentedSeq", "CommentedKeySeq", @@ -127,7 +127,7 @@ class LineCol(object): # type: () -> None self.line = None self.col = None - self.data = None # type: Union[None, Dict[Any, Any]] + self.data = None # type: Optional[Dict[Any, Any]] def add_kv_line_col(self, key, data): # type: (Any, Any) -> None |