Skip to content

Commit

Permalink
apply bareos-check-sources
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge committed Feb 27, 2024
1 parent 1b7ea4f commit f9aee0d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
10 changes: 6 additions & 4 deletions devtools/pip-tools/pr_tool/backport.py
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2023-2023 Bareos GmbH & Co. KG
# Copyright (C) 2023-2024 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -150,7 +150,9 @@ def generate_commit_lines(original_pr, title, commits):

def parse_commit_lines(lines):
commit_lines = [
l.lstrip().partition(" ") for l in lines if not l.strip().startswith("#") and l.strip() != ""
l.lstrip().partition(" ")
for l in lines
if not l.strip().startswith("#") and l.strip() != ""
]
todo = []
for commit, space, descr in commit_lines:
Expand Down Expand Up @@ -326,9 +328,9 @@ def publish(*, repo, dry_run=False):

labels = munge_labels(original_data["labels"], base_branch)

template_file = resources.files(__package__).joinpath('backport_pr_template.md')
template_file = resources.files(__package__).joinpath("backport_pr_template.md")
template_vars = {"original_pr": original_pr, "base_branch": base_branch}
with template_file.open('r', encoding="utf-8") as template_fp:
with template_file.open("r", encoding="utf-8") as template_fp:
with NamedTemporaryFile("w+", suffix=".md") as body_fp:
_fill_template(template_fp, body_fp, template_vars)
if not git_editor(repo, body_fp.name):
Expand Down
2 changes: 1 addition & 1 deletion devtools/pip-tools/pr_tool/github.py
@@ -1,6 +1,6 @@
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2023-2023 Bareos GmbH & Co. KG
# Copyright (C) 2023-2024 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand Down
3 changes: 2 additions & 1 deletion devtools/pip-tools/pr_tool/main.py
@@ -1,7 +1,7 @@
#!/usr/bin/python3
# BAREOS® - Backup Archiving REcovery Open Sourced
#
# Copyright (C) 2022-2023 Bareos GmbH & Co. KG
# Copyright (C) 2022-2024 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -50,6 +50,7 @@ def positive_int(val):
raise ArgumentTypeError(f"'{val}' is not a positive integer")
return intval


class Mark:
PASS = " ✓ "
INFO = " ➜ "
Expand Down

0 comments on commit f9aee0d

Please sign in to comment.