Steps to reproduce

  1. run pylint as pre-commit (using pre-commit/[email protected] on github actions)

Current behavior

Check for Odoo modules using pylint......................................Failed
- hook id: pylint_odoo
- exit code: 1
Traceback (most recent call last):
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/bin/pylint", line 8, in <module>
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/", line 32, in run_pylint
    from pylint.lint import Run as PylintRun
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/lint/", line 19, in <module>
    from pylint.config.exceptions import ArgumentPreprocessingError
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/config/", line 25, in <module>
    from pylint.config.arguments_provider import UnsupportedAction
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/config/", line 15, in <module>
    from pylint.config.arguments_manager import _ArgumentsManager
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/config/", line 25, in <module>
    from pylint import utils
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/utils/", line 9, in <module>
    from pylint.utils.ast_walker import ASTWalker
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/pylint/utils/", line 13, in <module>
    from astroid import nodes
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/astroid/", line 46, in <module>
    from astroid import inference, raw_building
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/astroid/", line 18, in <module>
    from astroid import bases, constraint, decorators, helpers, nodes, protocols, util
  File "/home/runner/.cache/pre-commit/repony02cj9v/py_env-python3/lib/python3.10/site-packages/astroid/", line 19, in <module>
    from typing_extensions import Self
ModuleNotFoundError: No module named 'typing_extensions'

Expected behavior

Should use astroid without exception being raised

pre-commit hook:

  - repo:
    rev: v8.0.17
      - id: pylint_odoo
          - --rcfile=.pylintrc-mandatory
        files: ^src/ # only check Odoo code

Looks like the issue is because of this recent change:

Not sure how requirements are handled exactly there, but requirements_test_min.txt has typing-extension, yet requirements_test_pre_commit.txt does not. If pre-commit requirements one is only used to set up dependencies, this might be the problem?


Thank you for opening the issue. requirements_test_min.txt is used only in our continuous integration, so it was hiding the issue. With #1944 the CI correctly fail now.


I see, thanks for clarification


It was released in astroid 2.13.2, please update if you encounter the issue.


@Pierre-Sassoulas thanks, its working now.

© 2022 - All rights reserved.