From 43f56d99d3ff8a9f448c37554fac9d7269d58d90 Mon Sep 17 00:00:00 2001
From: thibaud <thibaud@le-filament.com>
Date: Tue, 24 Sep 2024 08:37:57 +0200
Subject: [PATCH] [FIX] Fixed pre-commit

---
 .copier-answers.yml              | 24 ++++++++++++++++++++++++
 .eslintrc.yml                    |  2 +-
 .gitignore                       |  1 -
 .pre-commit-config.yaml          | 23 ++++++++++++-----------
 .pylintrc                        |  3 +++
 .pylintrc-mandatory              |  1 +
 models/account_invoice_report.py | 12 +++++++-----
 7 files changed, 48 insertions(+), 18 deletions(-)
 create mode 100644 .copier-answers.yml

diff --git a/.copier-answers.yml b/.copier-answers.yml
new file mode 100644
index 0000000..d7696c8
--- /dev/null
+++ b/.copier-answers.yml
@@ -0,0 +1,24 @@
+# Do NOT update manually; changes here will be overwritten by Copier
+_commit: v1.14.2
+_src_path: https://github.com/OCA/oca-addons-repo-template.git
+ci: GitHub
+dependency_installation_mode: PIP
+generate_requirements_txt: false
+github_check_license: false
+github_ci_extra_env: {}
+github_enable_codecov: false
+github_enable_makepot: false
+github_enable_stale_action: false
+github_enforce_dev_status_compatibility: false
+include_wkhtmltopdf: false
+odoo_version: 14.0
+org_name: Le Filament
+org_slug: lefilament
+rebel_module_groups: []
+repo_description: null
+repo_name: null
+repo_slug: template_module
+repo_website: https://le-filament.com
+travis_apt_packages: []
+travis_apt_sources: []
+
diff --git a/.eslintrc.yml b/.eslintrc.yml
index d4cc423..9429bc6 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -4,7 +4,7 @@ env:
 
 # See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
 parserOptions:
-  ecmaVersion: 2017
+  ecmaVersion: 2019
 
 overrides:
   - files:
diff --git a/.gitignore b/.gitignore
index 818770f..9c283fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,7 +15,6 @@ build/
 develop-eggs/
 dist/
 eggs/
-lib/
 lib64/
 parts/
 sdist/
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1c6434b..4acca68 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -27,6 +27,11 @@ repos:
         entry: found forbidden files; remove them
         language: fail
         files: "\\.rej$"
+      - id: en-po-files
+        name: en.po files cannot exist
+        entry: found a en.po file
+        language: fail
+        files: '[a-zA-Z0-9_]*/i18n/en\.po$'
   - repo: https://github.com/oca/maintainer-tools
     rev: ab1d7f6
     hooks:
@@ -46,7 +51,7 @@ repos:
           - --remove-duplicate-keys
           - --remove-unused-variables
   - repo: https://github.com/psf/black
-    rev: 20.8b1
+    rev: 22.3.0
     hooks:
       - id: black
   - repo: https://github.com/pre-commit/mirrors-prettier
@@ -96,32 +101,28 @@ repos:
       - id: pyupgrade
         args: ["--keep-percent-format"]
   - repo: https://github.com/PyCQA/isort
-    rev: 5.5.1
+    rev: 5.12.0
     hooks:
       - id: isort
         name: isort except __init__.py
         args:
           - --settings=.
         exclude: /__init__\.py$
-  - repo: https://gitlab.com/PyCQA/flake8
+  - repo: https://github.com/PyCQA/flake8
     rev: 3.8.3
     hooks:
       - id: flake8
         name: flake8
         additional_dependencies: ["flake8-bugbear==20.1.4"]
-  - repo: https://github.com/PyCQA/pylint
-    rev: pylint-2.5.3
+  - repo: https://github.com/OCA/pylint-odoo
+    rev: 7.0.2
     hooks:
-      - id: pylint
+      - id: pylint_odoo
         name: pylint with optional checks
         args:
           - --rcfile=.pylintrc
           - --exit-zero
         verbose: true
-        additional_dependencies: &pylint_deps
-          - pylint-odoo==3.5.0
-      - id: pylint
-        name: pylint with mandatory checks
+      - id: pylint_odoo
         args:
           - --rcfile=.pylintrc-mandatory
-        additional_dependencies: *pylint_deps
diff --git a/.pylintrc b/.pylintrc
index dc6270e..941ea6b 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,3 +1,5 @@
+
+
 [MASTER]
 load-plugins=pylint_odoo
 score=n
@@ -73,6 +75,7 @@ enable=anomalous-backslash-in-string,
     invalid-commit,
     missing-manifest-dependency,
     missing-newline-extrafiles,
+    missing-readme,
     no-utf8-coding-comment,
     odoo-addons-relative-import,
     old-api7-method-defined,
diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory
index 43ea239..4336f52 100644
--- a/.pylintrc-mandatory
+++ b/.pylintrc-mandatory
@@ -1,3 +1,4 @@
+
 [MASTER]
 load-plugins=pylint_odoo
 score=n
diff --git a/models/account_invoice_report.py b/models/account_invoice_report.py
index 226483b..05a40fd 100644
--- a/models/account_invoice_report.py
+++ b/models/account_invoice_report.py
@@ -1,16 +1,18 @@
 # Copyright 2024- Le Filament (https://le-filament.com)
 # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
 
-from odoo import fields, models, api
+from odoo import fields, models
 
 
 class AccountInvoiceReport(models.Model):
     _inherit = "account.invoice.report"
 
     membership_state = fields.Char(string="Statut d'adhésion actuel")
-    region_id = fields.Many2one("res.region",string="Région implantation")
+    region_id = fields.Many2one("res.region", string="Région implantation")
     legal_status_id = fields.Many2one("afac.partner.legal", string="Statut juridique")
-    legal_status_detail_id = fields.Many2one("afac.partner.legal.detail",string="Statut juridique détaillé")
+    legal_status_detail_id = fields.Many2one(
+        "afac.partner.legal.detail", string="Statut juridique détaillé"
+    )
 
     # ------------------------------------------------------
     # Fields declaration
@@ -44,9 +46,9 @@ class AccountInvoiceReport(models.Model):
     # Business methods
     # ------------------------------------------------------
     def _select(self):
-        return(
+        return (
             super(AccountInvoiceReport, self)._select()
-            +""",
+            + """,
             partner.membership_state as membership_state,
             partner.region_id as region_id,
             partner.legal_status_id as legal_status_id,
-- 
GitLab