Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -34,14 +34,14 @@ 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
rev: v2.2.0
hooks:
- id: seed-isort-config
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
3 changes: 2 additions & 1 deletion src/oca_github_bot/__main__.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/oca_github_bot/pypi.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 2 additions & 6 deletions tests/test_build_wheels.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 3 additions & 9 deletions tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"]),
Expand Down Expand Up @@ -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]
Expand Down
Loading