From 789b203a65ff69d547756d2b767e72bae93fb1e3 Mon Sep 17 00:00:00 2001 From: oca-git-bot Date: Wed, 1 May 2024 17:29:07 +0000 Subject: [PATCH 1/2] [IMP] update dotfiles --- .copier-answers.yml | 2 +- .github/workflows/stale.yml | 4 ++-- .github/workflows/test.yml | 4 +++- .pre-commit-config.yaml | 6 ++++-- .ruff.toml | 1 + 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.copier-answers.yml b/.copier-answers.yml index 7aa180ca9bde..953859a6255e 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Do NOT update manually; changes here will be overwritten by Copier -_commit: v1.19 +_commit: v1.21.1 _src_path: gh:oca/oca-addons-repo-template additional_ruff_rules: [] ci: GitHub diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 1693a1253bda..fa17fcd4e854 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Stale PRs and issues policy - uses: actions/stale@v4 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} # General settings. @@ -48,7 +48,7 @@ jobs: # * Issues that are pending more information # * Except Issues marked as "no stale" - name: Needs more information stale issues policy - uses: actions/stale@v4 + uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} ascending: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36c22a87b3a1..03c1acbbcf0b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -63,7 +63,9 @@ jobs: run: oca_init_test_database - name: Run tests run: oca_run_tests - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} - name: Update .pot files run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }} if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f08408b0b1d..c3097e1d5a1d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,8 @@ exclude: | readme/.*\.(rst|md)$| # Ignore build and dist directories in addons /build/|/dist/| + # Ignore test files in addons + /tests/samples/.*| # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: @@ -41,7 +43,7 @@ repos: hooks: - id: whool-init - repo: https://github.com/oca/maintainer-tools - rev: f71041f22b8cd68cf7c77b73a14ca8d8cd190a60 + rev: 9a170331575a265c092ee6b24b845ec508e8ef75 hooks: # update the NOT INSTALLABLE ADDONS section above - id: oca-update-pre-commit-excluded-addons @@ -110,7 +112,7 @@ repos: args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/OCA/pylint-odoo - rev: v8.0.19 + rev: v9.0.4 hooks: - id: pylint_odoo name: pylint with optional checks diff --git a/.ruff.toml b/.ruff.toml index 634db8e79b40..0240c75f6a4a 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -6,6 +6,7 @@ fix = true extend-select = [ "B", "C90", + "E501", # line too long (default 88) "I", # isort "UP", # pyupgrade ] From a9956a6c7631d52d7779d6c58ef59d9cfa59efcd Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 2 May 2024 16:05:44 +0200 Subject: [PATCH 2/2] [FIX] stock_picking*: Pre-commit fixes --- stock_picking_invoice_link/models/account_move.py | 3 ++- .../tests/test_stock_picking_invoice_link.py | 2 +- .../tests/test_stock_picking_show_return.py | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/stock_picking_invoice_link/models/account_move.py b/stock_picking_invoice_link/models/account_move.py index 2268b6100e19..cb25d5fd1701 100644 --- a/stock_picking_invoice_link/models/account_move.py +++ b/stock_picking_invoice_link/models/account_move.py @@ -16,7 +16,8 @@ class AccountMove(models.Model): string="Related Pickings", store=True, compute="_compute_picking_ids", - help="Related pickings (only when the invoice has been generated from a sale order).", + help="Related pickings (only when the invoice has been generated from a sale " + "order).", ) delivery_count = fields.Integer( diff --git a/stock_picking_invoice_link/tests/test_stock_picking_invoice_link.py b/stock_picking_invoice_link/tests/test_stock_picking_invoice_link.py index ce91aa0dabf0..4b6a2a124f36 100644 --- a/stock_picking_invoice_link/tests/test_stock_picking_invoice_link.py +++ b/stock_picking_invoice_link/tests/test_stock_picking_invoice_link.py @@ -103,7 +103,7 @@ def test_00_sale_stock_invoice_link(self): action_data = pick_1.button_validate() backorder_wizard = Form( self.env["stock.backorder.confirmation"].with_context( - action_data["context"] + **action_data["context"] ) ).save() backorder_wizard.process() diff --git a/stock_picking_show_return/tests/test_stock_picking_show_return.py b/stock_picking_show_return/tests/test_stock_picking_show_return.py index e6435c6bfbdd..9ca6f828280f 100644 --- a/stock_picking_show_return/tests/test_stock_picking_show_return.py +++ b/stock_picking_show_return/tests/test_stock_picking_show_return.py @@ -22,7 +22,9 @@ def setUpClass(cls): { "name": cls.product.name, "location_id": picking_type.default_location_src_id.id, - "location_dest_id": picking_type.default_location_dest_id.id, + "location_dest_id": ( + picking_type.default_location_dest_id.id + ), "product_id": cls.product.id, "product_uom": cls.product.uom_id.id, "product_uom_qty": 1,