Skip to content

Commit

Permalink
[FIX] pre-commit compatibility odoo 11
Browse files Browse the repository at this point in the history
  • Loading branch information
josep-tecnativa committed Mar 5, 2025
1 parent c298f35 commit 26f1647
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .pre-commit-config.yaml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ repos:
entry: found forbidden files; remove them
language: fail
files: "\\.rej$"
{% if odoo_version < 12 -%}
- &maintainer_tools
repo: https://github.com/oca/maintainer-tools
rev: 400ffa99242c8b225ab4d34de78721a68b292a61
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
args:
- --addons-dir
- odoo/custom/src/private
{% else -%}
- &maintainer_tools
repo: https://github.com/oca/maintainer-tools
rev: b89f767503be6ab2b11e4f50a7557cb20066e667
Expand All @@ -52,6 +63,7 @@ repos:
args:
- --addons-dir
- odoo/custom/src/private
{% endif -%}
{% if odoo_version >= 14 -%}
- repo: https://github.com/OCA/odoo-pre-commit-hooks
rev: {{ proj_rev.odoo_pre_commit_hooks }}
Expand All @@ -68,11 +80,13 @@ repos:
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
{% else -%}
{% if odoo_version == 12 -%}
- repo: https://github.com/psf/black
rev: 23.9.1
hooks:
- id: black
additional_dependencies: ["click<=8.1.7"]
{% endif %}
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
Expand Down

0 comments on commit 26f1647

Please sign in to comment.