Autotest pylint fails due to astroid bug |
||
Issue description
Errors in PROJECT *chromiumos/third_party/autotest*!
COMMIT ebd1b95a:
Description:
>[autotest] Add standard return results and merging
>
>BUG= chromium:672348
>TEST=None
>
>Change-Id: I71ac7d3e84e620037700c9ca203843baeb98e776
>
>
Errors:
* Hook script "./utils/run_pylint.py" failed with code 1:
Traceback (most recent call last):
File "./utils/run_pylint.py", line 479, in <module>
main()
File "./utils/run_pylint.py", line 472, in main
pylint_base_opts)
File "./utils/run_pylint.py", line 397, in check_committed_files
batch_check_files(temp_files, pylint_base_opts)
File "./utils/run_pylint.py", line 246, in batch_check_files
exit=False)
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/pylint/lint.py", line 1040, in __init__
linter.check(args)
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/pylint/lint.py", line 626, in check
self.check_astroid_module(astroid, walker, rawcheckers, tokencheckers)
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/pylint/lint.py", line 712, in check_astroid_module
walker.walk(astroid)
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/pylint/utils.py", line 697, in walk
self.walk(child)
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/pylint/utils.py", line 697, in walk
self.walk(child)
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/pylint/utils.py", line 694, in walk
cb(astroid)
File "./utils/run_pylint.py", line 183, in visit_function
if _is_test_case_method(node):
File "./utils/run_pylint.py", line 414, in _is_test_case_method
parent_class_names = {x.name for x in node.parent.frame().ancestors()}
File "./utils/run_pylint.py", line 414, in <setcomp>
parent_class_names = {x.name for x in node.parent.frame().ancestors()}
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/astroid/scoped_nodes.py", line 810, in ancestors
for grandpa in baseobj.ancestors(True, context):
File "/usr/local/google/home/ayatane/src/chromiumos/src/third_party/autotest/files/site-packages/astroid/scoped_nodes.py", line 801, in ancestors
for baseobj in stmt.infer(context):
TypeError: unbound method infer() must be called with Tuple instance as first argument (got InferenceContext instance instead)
,
Jul 19 2017
FTR: It's chocking on trying to walk the ancestors of a class that inherits from collections.namedtuple
,
Jul 27 2017
,
Jul 27 2017
Copied comment from other bug After Paul lands his run_pylint refactor [1] so that it works with newer versions of pylint, I can land my bump for astroid/pylint [2] which fixes this. [1]: https://chromium-review.googlesource.com/c/437656/ [2]: https://chromium-review.googlesource.com/c/578150/
,
Jul 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/4c275d2ed563b96daf4bc7bfe1d3aee6e6f5179b commit 4c275d2ed563b96daf4bc7bfe1d3aee6e6f5179b Author: Allen Li <ayatane@chromium.org> Date: Fri Jul 28 04:39:02 2017 [autotest] Bump astroid package version Otherwise pylint fails due to astroid bug https://bitbucket.org/logilab/astroid/issues/3/error-after-upgrade-to-pylint-10 Our monkey-patched @param check breaks with the new pylint version and it's nontrivial to fix. I am okay with just dropping it. BUG= chromium:746539 TEST=None Change-Id: I5156f9c2d5218809c6a26f0625625cb60919342b Reviewed-on: https://chromium-review.googlesource.com/578150 Commit-Ready: Aviv Keshet <akeshet@chromium.org> Tested-by: Aviv Keshet <akeshet@chromium.org> Reviewed-by: Aviv Keshet <akeshet@chromium.org> [modify] https://crrev.com/4c275d2ed563b96daf4bc7bfe1d3aee6e6f5179b/utils/external_packages.py [modify] https://crrev.com/4c275d2ed563b96daf4bc7bfe1d3aee6e6f5179b/utils/run_pylint.py
,
Aug 15 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by ayatane@chromium.org
, Jul 19 2017