Skip to content

[CI][Dev][Python] cython-lint fails with AttributeError for DictComprehensionAppendNode #50985

Description

@hiroyuki-sato

Describe the bug, including details regarding any error messages, version, and platform.

Python (Cython) Lint failed.
https://github.com/apache/arrow/actions/runs/32839428780/job/97775436998?pr=50935#step:5:69

Python (Cython) Lint.....................................................Failed
- hook id: cython-lint
- exit code: 1
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/bin/cython-lint", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 960, in main
ret |= _main(
^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 837, in _main
lines = run_ast_checks(code, filename, violations)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 751, in run_ast_checks
names, imported_names, global_names, exported_imports = _traverse_file(
^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 541, in _traverse_file
expr = node.loop.body.value_expr
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictComprehensionAppendNode' object has no attribute 'value_expr'
Traceback (most recent call last):
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/bin/cython-lint", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 960, in main
ret |= _main(
^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 837, in _main
lines = run_ast_checks(code, filename, violations)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 751, in run_ast_checks
names, imported_names, global_names, exported_imports = _traverse_file(
^^^^^^^^^^^^^^^
File "/home/runner/.cache/pre-commit/repoohugd5tn/py_env-python3/lib/python3.12/site-packages/cython_lint/cython_lint.py", line 541, in _traverse_file
expr = node.loop.body.value_expr
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DictComprehensionAppendNode' object has no attribute 'value_expr'

Component(s)

Developer Tools

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions