Reformat using black.

This commit is contained in:
Jelmer Vernooij 2021-02-09 23:19:40 +00:00
parent 4b1591d864
commit 8aae9c93d8
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8
7 changed files with 327 additions and 266 deletions

View file

@ -35,13 +35,14 @@ from debmutate.changelog import get_maintainer, format_datetime
from breezy import osutils
from breezy.mutabletree import MutableTree
from breezy.plugins.debian.builder import BuildFailedError
from breezy.plugins.debian.util import BuildFailedError
from buildlog_consultant.sbuild import (
worker_failure_from_sbuild_log,
SbuildFailure,
)
DEFAULT_BUILDER = "sbuild --no-clean-source"

View file

@ -30,7 +30,7 @@ from debian.deb822 import (
Deb822,
PkgRelation,
Release,
)
)
from debian.changelog import Version
from breezy.commit import PointlessCommit
@ -113,6 +113,7 @@ from buildlog_consultant.sbuild import (
SbuildFailure,
)
DEFAULT_MAX_ITERATIONS = 10
@ -124,18 +125,21 @@ class CircularDependency(Exception):
class DependencyContext(object):
def __init__(self, tree: MutableTree,
subpath: str = '', committer: Optional[str] = None,
update_changelog: bool = True):
def __init__(
self,
tree: MutableTree,
subpath: str = "",
committer: Optional[str] = None,
update_changelog: bool = True,
):
self.tree = tree
self.subpath = subpath
self.committer = committer
self.update_changelog = update_changelog
def add_dependency(
self, package: str,
minimum_version: Optional[Version] = None) -> bool:
self, package: str, minimum_version: Optional[Version] = None
) -> bool:
raise NotImplementedError(self.add_dependency)
@ -273,9 +277,13 @@ def add_test_dependency(
)
def commit_debian_changes(tree: MutableTree, subpath: str,
summary: str, committer: Optional[str] = None,
update_changelog: bool = True) -> bool:
def commit_debian_changes(
tree: MutableTree,
subpath: str,
summary: str,
committer: Optional[str] = None,
update_changelog: bool = True,
) -> bool:
with tree.lock_write():
try:
if update_changelog: