diff options
author | Dmitry Pribysh <dmand@yandex.ru> | 2015-10-27 18:03:15 +0300 |
---|---|---|
committer | Dmitry Pribysh <dmand@yandex.ru> | 2015-10-27 18:03:15 +0300 |
commit | 4f85cfbec5bd5576754274adb351116e164bc19a (patch) | |
tree | ad255a14205ddfcdbfbc1a56c768bf467ab5153c /pylint/test/functional/iterable_context.py | |
parent | 328f24b72197c1a8ac22a58357f67740d6e1dd94 (diff) | |
download | pylint-4f85cfbec5bd5576754274adb351116e164bc19a.tar.gz |
Make iterable checker skip classes that are inferred to be abstractfix-685
Diffstat (limited to 'pylint/test/functional/iterable_context.py')
-rw-r--r-- | pylint/test/functional/iterable_context.py | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/pylint/test/functional/iterable_context.py b/pylint/test/functional/iterable_context.py index 9c5d1b6..fa4e617 100644 --- a/pylint/test/functional/iterable_context.py +++ b/pylint/test/functional/iterable_context.py @@ -149,7 +149,10 @@ class BaseType(object): return True else: # error should not be emitted here - return value in self.valid_values + for v in self.valid_values: + if value == v: + return True + return False class AbstractUrlMarkManager(object): def __init__(self): @@ -161,3 +164,16 @@ class AbstractUrlMarkManager(object): def _init_lineparser(self): raise NotImplementedError + +# class is not named as abstract +# but still is deduceably abstract +class UrlMarkManager(object): + def __init__(self): + self._lineparser = None + self._init_lineparser() + # error should not be emitted here + for line in self._lineparser: + print(line) + + def _init_lineparser(self): + raise NotImplementedError |