Skip to content

Commit 7764c74

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent d16ef4c commit 7764c74

File tree

4 files changed

+8
-16
lines changed

4 files changed

+8
-16
lines changed

src/oca_github_bot/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Copyright (c) ACSONE SA/NV 2018
22
# Distributed under the MIT License (http://opensource.org/licenses/MIT).
33

4-
""" OCA GitHub Bot
4+
"""OCA GitHub Bot
55
66
This is the main program, which provides the dispatching
77
mechanisms for webhook calls from github.
88
"""
9+
910
import logging
1011

1112
import aiohttp

src/oca_github_bot/pypi.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Copyright (c) ACSONE SA/NV 2021
22
# Distributed under the MIT License (http://opensource.org/licenses/MIT).
33
"""Utilities to work with PEP 503 package indexes."""
4+
45
import logging
56
import os
67
from io import StringIO

tests/test_build_wheels.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,11 @@ def _make_addon(
3838
)
3939
(addon_dir / "__init__.py").write_text("")
4040
if pyproject:
41-
(addon_dir / "pyproject.toml").write_text(
42-
textwrap.dedent(
43-
"""\
41+
(addon_dir / "pyproject.toml").write_text(textwrap.dedent("""\
4442
[build-system]
4543
requires = ["whool"]
4644
build-backend = "whool.buildapi"
47-
"""
48-
)
49-
)
45+
"""))
5046
subprocess.check_call(["git", "add", addon_name], cwd=addons_dir)
5147
subprocess.check_call(
5248
["git", "commit", "-m", "[BOT] add " + addon_name], cwd=addons_dir

tests/test_commands.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ def test_parse_command_not_a_command():
1818

1919

2020
def test_parse_command_multi():
21-
cmds = list(
22-
parse_commands(
23-
"""
21+
cmds = list(parse_commands("""
2422
...
2523
/ocabot merge major
2624
/ocabot merge patch
@@ -33,9 +31,7 @@ def test_parse_command_multi():
3331
/ocabot merge minor # ignored
3432
/ocabot rebase, please
3533
...
36-
"""
37-
)
38-
)
34+
"""))
3935
assert [(cmd.name, cmd.options) for cmd in cmds] == [
4036
("merge", ["major"]),
4137
("merge", ["patch"]),
@@ -100,9 +96,7 @@ def test_parse_command_comment():
10096
> Some comment {merge_command}
10197
>> Double comment! {merge_command}
10298
This is the one {merge_command} patch
103-
""".format(
104-
merge_command="/ocabot merge"
105-
)
99+
""".format(merge_command="/ocabot merge")
106100
command = list(parse_commands(body))
107101
assert len(command) == 1
108102
command = command[0]

0 commit comments

Comments
 (0)