diff options
author | Brett Cannon <brett@python.org> | 2014-08-29 15:48:24 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2014-08-29 15:48:24 -0400 |
commit | 8e23aa2b179274c9c1b128a8b3daf8d2e24cfd75 (patch) | |
tree | c234e08aa390be9bca941e66e508071e5e44a801 /checkers/utils.py | |
parent | 001469c8272a235b4f62b9b5c3ee248635168ad4 (diff) | |
parent | c2cc31874880d7f0d5bd444c6a3b17fa817e2509 (diff) | |
download | pylint-python_6.tar.gz |
Merge with defaultpython_6
Diffstat (limited to 'checkers/utils.py')
-rw-r--r-- | checkers/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/checkers/utils.py b/checkers/utils.py index af1440d..55bcdd4 100644 --- a/checkers/utils.py +++ b/checkers/utils.py @@ -87,11 +87,11 @@ def safe_infer(node): """ try: inferit = node.infer() - value = inferit.next() + value = next(inferit) except astroid.InferenceError: return try: - inferit.next() + next(inferit) return # None if there is ambiguity on the inferred node except astroid.InferenceError: return # there is some kind of ambiguity @@ -471,7 +471,7 @@ def has_known_bases(klass): pass try: for base in klass.bases: - result = base.infer().next() + result = next(base.infer()) # TODO: check for A->B->A->B pattern in class structure too? if not isinstance(result, astroid.Class) or result is klass or not has_known_bases(result): klass._all_bases_known = False |