From be0b889722b8d26bceeea7fc5cee41242ee6dae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florent=20Cayr=C3=A9?= Date: Fri, 19 Sep 2025 19:06:34 +0200 Subject: [PATCH] Remove pygount hardcoded version and improve compatibility pygount 1.4.0 is now very old and current code does not work on recent versions. It is however easy to improve compatibility accross pygount versions using the code_count property instead of the code one, which was removed in 2.0.0. That way, pygount 1.4.0 stays supported but also modern version up to at least 3.1.0. --- module_analysis/__manifest__.py | 2 +- module_analysis/models/ir_module_module.py | 8 ++++---- requirements.txt | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module_analysis/__manifest__.py b/module_analysis/__manifest__.py index 66b05d814ba..0780c14d2df 100644 --- a/module_analysis/__manifest__.py +++ b/module_analysis/__manifest__.py @@ -26,7 +26,7 @@ "data/ir_module_type_rule.xml", ], "external_dependencies": { - "python": ["pygount==1.4.0"], + "python": ["pygount"], }, "post_init_hook": "analyse_installed_modules", "installable": True, diff --git a/module_analysis/models/ir_module_module.py b/module_analysis/models/ir_module_module.py index 81866cef449..a509c47d733 100644 --- a/module_analysis/models/ir_module_module.py +++ b/module_analysis/models/ir_module_module.py @@ -52,10 +52,10 @@ def _get_analyse_settings(self): field_name: Odoo field name to store the analysis """ return { - ".py": {"code": "python_code_qty"}, - ".xml": {"code": "xml_code_qty"}, - ".js": {"code": "js_code_qty"}, - ".css": {"code": "css_code_qty"}, + ".py": {"code_count": "python_code_qty"}, + ".xml": {"code_count": "xml_code_qty"}, + ".js": {"code_count": "js_code_qty"}, + ".css": {"code_count": "css_code_qty"}, } @api.model diff --git a/requirements.txt b/requirements.txt index 31fe979e873..0172243c07f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,6 +10,6 @@ odoo_test_helper odoorpc openpyxl openupgradelib -pygount==1.4.0 +pygount pysftp sentry_sdk<=1.9.0