From 90583069b7efd3744e46ba65499d7090e09d70c3 Mon Sep 17 00:00:00 2001 From: Anthon van der Neut Date: Wed, 7 Jun 2017 11:46:23 +0200 Subject: fix issue # 123: type annotations mypy needed updating from 0.501 to 0.511, with may different warnings/errors then before --- comments.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'comments.py') diff --git a/comments.py b/comments.py index 93974d9..87b6629 100644 --- a/comments.py +++ b/comments.py @@ -259,7 +259,7 @@ class CommentedBase(object): if c[3] is None: c[3] = [] for com in after.split('\n'): - c[3].append(comment_token(com, start_mark)) + c[3].append(comment_token(com, start_mark)) # type: ignore @property def fa(self): @@ -359,6 +359,10 @@ class CommentedBase(object): # type: () -> Any raise NotImplementedError + def _yaml_get_column(self, key): + # type: (Any) -> Any + raise NotImplementedError + class CommentedSeq(list, CommentedBase): __slots__ = Comment.attrib, @@ -389,7 +393,7 @@ class CommentedSeq(list, CommentedBase): def pop(self, idx=None): # type: (Any) -> Any - res = list.pop(self, idx) + res = list.pop(self, idx) # type: ignore self.ca.items.pop(idx, None) # might not be there -> default value for list_index in sorted(self.ca.items): if list_index < idx: -- cgit v1.2.1