diff options
author | Anthon van der Neut <anthon@mnt.org> | 2017-03-16 08:50:30 +0100 |
---|---|---|
committer | Anthon van der Neut <anthon@mnt.org> | 2017-03-16 08:50:30 +0100 |
commit | f75754aa90ea4d53f87aba5fce692185a25514c3 (patch) | |
tree | 678c37afebe1efd786d513e222a053a3cfe76a07 /error.py | |
parent | 65537ac45d2fe35a98322aea5e6056baa1aefd8a (diff) | |
download | ruamel.yaml-f75754aa90ea4d53f87aba5fce692185a25514c3.tar.gz |
some changes for mypy --strict
Diffstat (limited to 'error.py')
-rw-r--r-- | error.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -4,6 +4,8 @@ from __future__ import absolute_import import warnings +from typing import Any, Dict, Optional, List # NOQA + from ruamel.yaml.compat import utf8 __all__ = ['FileMark', 'StringMark', 'CommentMark', @@ -78,6 +80,7 @@ class CommentMark(object): __slots__ = 'column', def __init__(self, column): + # type: (Any) -> None self.column = column @@ -88,6 +91,7 @@ class YAMLError(Exception): class MarkedYAMLError(YAMLError): def __init__(self, context=None, context_mark=None, problem=None, problem_mark=None, note=None): + # type: (Any, Any, Any, Any, Any) -> None self.context = context self.context_mark = context_mark self.problem = problem @@ -95,6 +99,7 @@ class MarkedYAMLError(YAMLError): self.note = note def __str__(self): + # type: () -> str lines = [] if self.context is not None: lines.append(self.context) |