From c3fc6593288ce4e1e98fa0826265cf62da883401 Mon Sep 17 00:00:00 2001 From: Sander Lienaerts Date: Mon, 14 Oct 2024 09:03:30 +0200 Subject: [PATCH] [FIX] pre-commit: update pylint odoo to enable valid-odoo-versions key for v18 --- src/.pre-commit-config.yaml.jinja | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/src/.pre-commit-config.yaml.jinja b/src/.pre-commit-config.yaml.jinja index 0ec619c..ac84a76 100644 --- a/src/.pre-commit-config.yaml.jinja +++ b/src/.pre-commit-config.yaml.jinja @@ -38,7 +38,7 @@ {%- set repo_rev.pyupgrade = "v2.29.0" %} {%- set repo_rev.ruff = "v0.1.3" %} {%- set repo_rev.setuptools_odoo = "3.1.8" %} -{%- elif odoo_version < 18 %} +{%- elif odoo_version < 17 %} {%- set repo_rev.autoflake = "v1.6.1" %} {%- set repo_rev.black = "22.8.0" %} {%- set repo_rev.eslint = "v8.24.0" %} @@ -55,6 +55,23 @@ {%- set repo_rev.pyupgrade = "v2.38.2" %} {%- set repo_rev.ruff = "v0.1.3" %} {%- set repo_rev.setuptools_odoo = "3.1.8" %} +{%- elif odoo_version < 18 %} + {%- set repo_rev.autoflake = "v1.6.1" %} + {%- set repo_rev.black = "22.8.0" %} + {%- set repo_rev.eslint = "v8.24.0" %} + {%- set repo_rev.flake8 = "3.9.2" %} + {%- set repo_rev.flake8_bugbear = "21.9.2" %} + {%- set repo_rev.isort = "5.12.0" %} + {%- set repo_rev.maintainer_tools = "d5fab7ee87fceee858a3d01048c78a548974d935" %} + {%- set repo_rev.nodejs = "16.17.0" %} + {%- set repo_rev.odoo_pre_commit_hooks = "v0.0.25" %} + {%- set repo_rev.pre_commit_hooks = "v4.3.0" %} + {%- set repo_rev.prettier = "2.7.1" %} + {%- set repo_rev.prettier_xml = "2.2.0" %} + {%- set repo_rev.pylint_odoo = "v9.0.4" %} + {%- set repo_rev.pyupgrade = "v2.38.2" %} + {%- set repo_rev.ruff = "v0.1.3" %} + {%- set repo_rev.setuptools_odoo = "3.1.8" %} {%- else %} {%- set repo_rev.autoflake = "v1.6.1" %} {%- set repo_rev.black = "22.8.0" %} @@ -68,16 +85,12 @@ {%- set repo_rev.pre_commit_hooks = "v4.6.0" %} {%- set repo_rev.prettier = "2.7.1" %} {%- set repo_rev.prettier_xml = "2.2.0" %} - {%- set repo_rev.pylint_odoo = "v9.1.2" %} + {%- set repo_rev.pylint_odoo = "v9.1.3" %} {%- set repo_rev.pyupgrade = "v2.38.2" %} {%- set repo_rev.ruff = "v0.6.8" %} {%- set repo_rev.setuptools_odoo = "3.1.8" %} {%- endif %} -{%- if odoo_version > 16 %} - {%- set repo_rev.pylint_odoo = "v9.0.4" %} -{%- endif %} - {#- Older versions that differ a lot have their own hardcoded templates for readability #} {%- if odoo_version < 13 %} {%- include "version-specific/mqt-compat/.pre-commit-config.yaml.jinja" %}