From d16ef4c4808667595ce1d0f7193296f0a35a5147 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:57:30 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - https://github.com/psf/black → https://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...26.1.0) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/pycqa/flake8: 7.1.1 → 7.3.0](https://github.com/pycqa/flake8/compare/7.1.1...7.3.0) - [github.com/asottile/pyupgrade: v3.18.0 → v3.21.2](https://github.com/asottile/pyupgrade/compare/v3.18.0...v3.21.2) - [github.com/PyCQA/isort: 5.13.2 → 7.0.0](https://github.com/PyCQA/isort/compare/5.13.2...7.0.0) --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac5988f4..6d915857 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,12 +1,12 @@ default_language_version: python: python3 repos: -- repo: https://github.com/psf/black - rev: 24.10.0 +- repo: https://github.com/psf/black-pre-commit-mirror + rev: 26.1.0 hooks: - id: black - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -23,7 +23,7 @@ repos: - id: mixed-line-ending args: ["--fix=lf"] - repo: https://github.com/pycqa/flake8 - rev: 7.1.1 + rev: 7.3.0 hooks: - id: flake8 name: flake8 except __init__.py @@ -34,7 +34,7 @@ repos: args: [--extend-ignore=F401] # ignore imported unused in __init__.py files: __init__.py - repo: https://github.com/asottile/pyupgrade - rev: v3.18.0 + rev: v3.21.2 hooks: - id: pyupgrade - repo: https://github.com/asottile/seed-isort-config @@ -42,6 +42,6 @@ repos: hooks: - id: seed-isort-config - repo: https://github.com/PyCQA/isort - rev: 5.13.2 + rev: 7.0.0 hooks: - id: isort From 7764c74559821536add5212d49e705a189bc0c52 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 19 Jan 2026 17:57:47 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/oca_github_bot/__main__.py | 3 ++- src/oca_github_bot/pypi.py | 1 + tests/test_build_wheels.py | 8 ++------ tests/test_commands.py | 12 +++--------- 4 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/oca_github_bot/__main__.py b/src/oca_github_bot/__main__.py index 2d96a9fb..42031c9b 100644 --- a/src/oca_github_bot/__main__.py +++ b/src/oca_github_bot/__main__.py @@ -1,11 +1,12 @@ # Copyright (c) ACSONE SA/NV 2018 # Distributed under the MIT License (http://opensource.org/licenses/MIT). -""" OCA GitHub Bot +"""OCA GitHub Bot This is the main program, which provides the dispatching mechanisms for webhook calls from github. """ + import logging import aiohttp diff --git a/src/oca_github_bot/pypi.py b/src/oca_github_bot/pypi.py index 0a4355bd..5d50f91d 100644 --- a/src/oca_github_bot/pypi.py +++ b/src/oca_github_bot/pypi.py @@ -1,6 +1,7 @@ # Copyright (c) ACSONE SA/NV 2021 # Distributed under the MIT License (http://opensource.org/licenses/MIT). """Utilities to work with PEP 503 package indexes.""" + import logging import os from io import StringIO diff --git a/tests/test_build_wheels.py b/tests/test_build_wheels.py index 7647b145..c27bca9d 100644 --- a/tests/test_build_wheels.py +++ b/tests/test_build_wheels.py @@ -38,15 +38,11 @@ def _make_addon( ) (addon_dir / "__init__.py").write_text("") if pyproject: - (addon_dir / "pyproject.toml").write_text( - textwrap.dedent( - """\ + (addon_dir / "pyproject.toml").write_text(textwrap.dedent("""\ [build-system] requires = ["whool"] build-backend = "whool.buildapi" - """ - ) - ) + """)) subprocess.check_call(["git", "add", addon_name], cwd=addons_dir) subprocess.check_call( ["git", "commit", "-m", "[BOT] add " + addon_name], cwd=addons_dir diff --git a/tests/test_commands.py b/tests/test_commands.py index 7a9e90bf..10bd277b 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -18,9 +18,7 @@ def test_parse_command_not_a_command(): def test_parse_command_multi(): - cmds = list( - parse_commands( - """ + cmds = list(parse_commands(""" ... /ocabot merge major /ocabot merge patch @@ -33,9 +31,7 @@ def test_parse_command_multi(): /ocabot merge minor # ignored /ocabot rebase, please ... - """ - ) - ) + """)) assert [(cmd.name, cmd.options) for cmd in cmds] == [ ("merge", ["major"]), ("merge", ["patch"]), @@ -100,9 +96,7 @@ def test_parse_command_comment(): > Some comment {merge_command} >> Double comment! {merge_command} This is the one {merge_command} patch - """.format( - merge_command="/ocabot merge" - ) + """.format(merge_command="/ocabot merge") command = list(parse_commands(body)) assert len(command) == 1 command = command[0]