From 51f57d93da90e88d465fc29bab2880989c851863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 3 Feb 2023 13:13:25 +0100 Subject: [PATCH 1/2] Fix tree rendering issue on python 3.11 --- src/manifestoo/commands/interactive_tree.py | 4 ++-- src/manifestoo/commands/tree.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/manifestoo/commands/interactive_tree.py b/src/manifestoo/commands/interactive_tree.py index d6f2565..a1d8256 100644 --- a/src/manifestoo/commands/interactive_tree.py +++ b/src/manifestoo/commands/interactive_tree.py @@ -46,9 +46,9 @@ def _version_str(self) -> str: if not self.addon: return "✘ not installed" elif is_core_ce_addon(self.addon_name, self.context.odoo_series): - return f"{self.context.odoo_series}+{OdooEdition.CE}" + return f"{self.context.odoo_series.value}+{OdooEdition.CE.value}" elif is_core_ee_addon(self.addon_name, self.context.odoo_series): - return f"{self.context.odoo_series}+{OdooEdition.EE}" + return f"{self.context.odoo_series.value}+{OdooEdition.EE.value}" else: return self.addon.manifest.version or "no version" diff --git a/src/manifestoo/commands/tree.py b/src/manifestoo/commands/tree.py index 568125b..005901b 100644 --- a/src/manifestoo/commands/tree.py +++ b/src/manifestoo/commands/tree.py @@ -64,9 +64,9 @@ def sversion(self, odoo_series: OdooSeries) -> str: if not self.addon: return typer.style("✘ not installed", fg=typer.colors.RED) elif is_core_ce_addon(self.addon_name, odoo_series): - return f"{odoo_series}+{OdooEdition.CE}" + return f"{odoo_series.value}+{OdooEdition.CE.value}" elif is_core_ee_addon(self.addon_name, odoo_series): - return f"{odoo_series}+{OdooEdition.EE}" + return f"{odoo_series.value}+{OdooEdition.EE.value}" else: return self.addon.manifest.version or "no version" From f9e838908111cc67b6332ec82db6da582f76de2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Fri, 3 Feb 2023 13:14:58 +0100 Subject: [PATCH 2/2] Pre-commit autoupdate --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ae8db9e..548b29d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,11 +2,11 @@ default_language_version: python: python3 repos: - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black - repo: https://github.com/PyCQA/autoflake - rev: v2.0.0 + rev: v2.0.1 hooks: - id: autoflake args: @@ -27,7 +27,7 @@ repos: - id: flake8 additional_dependencies: ["flake8-bugbear==22.12.6"] - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/PyCQA/docformatter