launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #30765
[Merge] ~cjwatson/launchpad:black-py38 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:black-py38 into launchpad:master.
Commit message:
Upgrade Black's target Python version to 3.8
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/456431
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:black-py38 into launchpad:master.
diff --git a/lib/lp/archivepublisher/tests/test_publisher.py b/lib/lp/archivepublisher/tests/test_publisher.py
index 99b2a61..0f3f9e0 100644
--- a/lib/lp/archivepublisher/tests/test_publisher.py
+++ b/lib/lp/archivepublisher/tests/test_publisher.py
@@ -3120,7 +3120,7 @@ class TestUpdateByHash(TestPublisherBase):
def assertHasSuiteFiles(
self,
patterns: Sequence[str],
- *properties: Tuple[str, Optional[int], Optional[int], Optional[int]]
+ *properties: Tuple[str, Optional[int], Optional[int], Optional[int]],
) -> None:
"""Assert that the database records certain archive files.
diff --git a/lib/lp/charms/tests/test_charmhubclient.py b/lib/lp/charms/tests/test_charmhubclient.py
index 1d5c3bf..7ca8734 100644
--- a/lib/lp/charms/tests/test_charmhubclient.py
+++ b/lib/lp/charms/tests/test_charmhubclient.py
@@ -78,7 +78,7 @@ class RequestMatches(MatchesAll):
auth=None,
json_data=None,
file_data=None,
- **kwargs
+ **kwargs,
):
matchers = []
kwargs = dict(kwargs)
diff --git a/lib/lp/charms/tests/test_charmrecipe.py b/lib/lp/charms/tests/test_charmrecipe.py
index 5fad120..df6ba5a 100644
--- a/lib/lp/charms/tests/test_charmrecipe.py
+++ b/lib/lp/charms/tests/test_charmrecipe.py
@@ -273,7 +273,7 @@ class TestCharmRecipe(TestCaseWithFactory):
processor=None,
supports_virtualized=True,
supports_nonvirtualized=True,
- **kwargs
+ **kwargs,
):
if architecturetag is None:
architecturetag = self.factory.getUniqueUnicode("arch")
@@ -1860,7 +1860,7 @@ class TestCharmRecipeWebservice(TestCaseWithFactory):
git_ref=None,
private=False,
webservice=None,
- **kwargs
+ **kwargs,
):
if owner is None:
owner = self.person
@@ -2365,7 +2365,7 @@ class TestCharmRecipeWebservice(TestCaseWithFactory):
processor=None,
supports_virtualized=True,
supports_nonvirtualized=True,
- **kwargs
+ **kwargs,
):
if architecturetag is None:
architecturetag = self.factory.getUniqueUnicode("arch")
diff --git a/lib/lp/code/mail/branch.py b/lib/lp/code/mail/branch.py
index 7eaee76..c880ae5 100644
--- a/lib/lp/code/mail/branch.py
+++ b/lib/lp/code/mail/branch.py
@@ -220,7 +220,7 @@ class BranchMailer(BaseMailer):
revno=None,
revision_id=None,
notification_type=None,
- **kwargs
+ **kwargs,
):
super().__init__(
subject,
diff --git a/lib/lp/code/xmlrpc/tests/test_git.py b/lib/lp/code/xmlrpc/tests/test_git.py
index add6348..d309c5b 100644
--- a/lib/lp/code/xmlrpc/tests/test_git.py
+++ b/lib/lp/code/xmlrpc/tests/test_git.py
@@ -198,7 +198,7 @@ class TestGitAPIMixin:
path,
permission="read",
can_authenticate=False,
- **auth_kwargs
+ **auth_kwargs,
):
"""Assert that the given path cannot be translated."""
auth_params = _make_auth_params(
@@ -221,7 +221,7 @@ class TestGitAPIMixin:
message="Permission denied.",
permission="read",
can_authenticate=False,
- **auth_kwargs
+ **auth_kwargs,
):
"""Assert that looking at the given path returns PermissionDenied."""
auth_params = _make_auth_params(
@@ -244,7 +244,7 @@ class TestGitAPIMixin:
message="Authorisation required.",
permission="read",
can_authenticate=False,
- **auth_kwargs
+ **auth_kwargs,
):
"""Assert that looking at the given path returns Unauthorized."""
auth_params = _make_auth_params(
@@ -356,7 +356,7 @@ class TestGitAPIMixin:
writable=False,
trailing="",
private=False,
- **auth_kwargs
+ **auth_kwargs,
):
auth_params = _make_auth_params(
requester, can_authenticate=can_authenticate, **auth_kwargs
@@ -444,7 +444,7 @@ class TestGitAPIMixin:
requester,
git_repository,
can_authenticate=True,
- **auth_kwargs
+ **auth_kwargs,
):
translated_path = git_repository.getInternalPath()
auth_params = _make_auth_params(
@@ -499,7 +499,7 @@ class TestGitAPIMixin:
requester,
git_repository,
can_authenticate=True,
- **auth_kwargs
+ **auth_kwargs,
):
translated_path = git_repository.getInternalPath()
auth_params = _make_auth_params(
diff --git a/lib/lp/codehosting/vfs/tests/test_branchfs.py b/lib/lp/codehosting/vfs/tests/test_branchfs.py
index c3185c0..5a7f958 100644
--- a/lib/lp/codehosting/vfs/tests/test_branchfs.py
+++ b/lib/lp/codehosting/vfs/tests/test_branchfs.py
@@ -939,7 +939,7 @@ class TestBranchChangedNotification(TestCaseWithTransport):
branch_id,
stacked_on_url,
last_revision,
- *format_strings
+ *format_strings,
):
self._branch_changed_log.append(
dict(
@@ -1130,7 +1130,7 @@ class TestBranchChangedErrorHandling(TestCaseWithTransport, TestCase):
branch_id,
stacked_on_url,
last_revision,
- *format_strings
+ *format_strings,
):
"""Log an oops and raise an xmlrpc fault."""
diff --git a/lib/lp/scripts/tests/test_garbo.py b/lib/lp/scripts/tests/test_garbo.py
index 726ba55..eaa20e9 100644
--- a/lib/lp/scripts/tests/test_garbo.py
+++ b/lib/lp/scripts/tests/test_garbo.py
@@ -1838,7 +1838,7 @@ class TestGarbo(FakeAdapterMixin, TestCaseWithFactory):
keep_binary_files_days=_default,
base_image=False,
expected_count=0,
- **livefsbuild_kwargs
+ **livefsbuild_kwargs,
):
# Garbo should (or should not, if `expected_count=1`) remove LiveFS
# files of MIME type `content_type` that finished more than
diff --git a/lib/lp/services/fields/__init__.py b/lib/lp/services/fields/__init__.py
index 4c76094..63abc88 100644
--- a/lib/lp/services/fields/__init__.py
+++ b/lib/lp/services/fields/__init__.py
@@ -621,7 +621,7 @@ class URIField(TextLine):
allow_query=True,
allow_fragment=True,
trailing_slash=None,
- **kwargs
+ **kwargs,
):
super().__init__(**kwargs)
self.allowed_schemes = set(allowed_schemes)
@@ -1019,7 +1019,7 @@ class SnapBuildChannelsField(Dict):
description_prefix=None,
description=None,
extra_snap_names=None,
- **kwargs
+ **kwargs,
):
snap_names = list(self._core_snap_names)
if extra_snap_names is not None:
diff --git a/lib/lp/services/job/celeryjob.py b/lib/lp/services/job/celeryjob.py
index b9731f3..b240afa 100644
--- a/lib/lp/services/job/celeryjob.py
+++ b/lib/lp/services/job/celeryjob.py
@@ -119,7 +119,7 @@ class PrefixedTask(Task):
link=None,
link_error=None,
shadow=None,
- **options
+ **options,
):
"""Create a task_id if none is specified.
diff --git a/lib/lp/services/macaroons/interfaces.py b/lib/lp/services/macaroons/interfaces.py
index 393370d..37db08d 100644
--- a/lib/lp/services/macaroons/interfaces.py
+++ b/lib/lp/services/macaroons/interfaces.py
@@ -57,7 +57,7 @@ class IMacaroonIssuerPublic(Interface):
require_context=True,
errors=None,
user=None,
- **kwargs
+ **kwargs,
):
"""Verify that `macaroon` is valid for `context`.
diff --git a/lib/lp/services/timeout.py b/lib/lp/services/timeout.py
index 2c4c3fa..99a4847 100644
--- a/lib/lp/services/timeout.py
+++ b/lib/lp/services/timeout.py
@@ -346,7 +346,7 @@ class URLFetcher:
allow_file=False,
output_file=None,
check_status=True,
- **request_kwargs
+ **request_kwargs,
):
"""Fetch the URL using a custom HTTP handler supporting timeout.
diff --git a/lib/lp/services/webapp/servers.py b/lib/lp/services/webapp/servers.py
index 53db3f4..1bed9ee 100644
--- a/lib/lp/services/webapp/servers.py
+++ b/lib/lp/services/webapp/servers.py
@@ -977,7 +977,7 @@ class LaunchpadTestRequest(
outstream=None,
method="GET",
force_fresh_login_for_testing=False,
- **kw
+ **kw,
):
# PEP 3333 requires environment variables to be native strings that
# contain only code points representable in ISO-8859-1. To support
diff --git a/lib/lp/snappy/tests/test_snap.py b/lib/lp/snappy/tests/test_snap.py
index 3cc6d7f..167dfdb 100644
--- a/lib/lp/snappy/tests/test_snap.py
+++ b/lib/lp/snappy/tests/test_snap.py
@@ -3771,7 +3771,7 @@ class TestSnapWebservice(TestCaseWithFactory):
private=False,
auto_build_archive=None,
auto_build_pocket=None,
- **kwargs
+ **kwargs,
):
if owner is None:
owner = self.person
diff --git a/lib/lp/soyuz/adapters/tests/test_archivedependencies.py b/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
index f415d0e..c999a9c 100644
--- a/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
+++ b/lib/lp/soyuz/adapters/tests/test_archivedependencies.py
@@ -176,7 +176,7 @@ class TestSourcesList(TestCaseWithFactory):
self,
signing_key_name="ppa-sample@xxxxxxxxxxxxx",
publish_binary=False,
- **kwargs
+ **kwargs,
):
try:
getattr(config, "in-process-key-server-fixture")
diff --git a/lib/lp/soyuz/mail/packageupload.py b/lib/lp/soyuz/mail/packageupload.py
index 1bcd8be..7d16641 100644
--- a/lib/lp/soyuz/mail/packageupload.py
+++ b/lib/lp/soyuz/mail/packageupload.py
@@ -482,7 +482,7 @@ class PackageUploadMailer(BaseMailer):
announce_from_person=None,
previous_version=None,
logger=None,
- **kwargs
+ **kwargs,
):
info = fetch_information(
spr, bprs, changes, previous_version=previous_version
diff --git a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
index fabff3d..142e97c 100644
--- a/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
+++ b/lib/lp/soyuz/tests/test_livefsbuildbehaviour.py
@@ -59,7 +59,7 @@ class TestLiveFSBuildBehaviourBase(TestCaseWithFactory):
archive=None,
pocket=PackagePublishingPocket.RELEASE,
with_builder=False,
- **kwargs
+ **kwargs,
):
"""Create a sample `ILiveFSBuildBehaviour`."""
if archive is None:
diff --git a/lib/lp/soyuz/tests/test_packagecopyjob.py b/lib/lp/soyuz/tests/test_packagecopyjob.py
index 3716d63..e414e11 100644
--- a/lib/lp/soyuz/tests/test_packagecopyjob.py
+++ b/lib/lp/soyuz/tests/test_packagecopyjob.py
@@ -1133,7 +1133,7 @@ class PlainPackageCopyJobTests(TestCaseWithFactory, LocalTestHelper):
target_pocket=PackagePublishingPocket.RELEASE,
include_binaries=False,
requester=None,
- **kwargs
+ **kwargs,
):
# Helper method to create a package copy job from an SPPH.
source = getUtility(IPlainPackageCopyJobSource)
diff --git a/lib/lp/soyuz/tests/test_publishing.py b/lib/lp/soyuz/tests/test_publishing.py
index 00ccd25..efcc4dd 100644
--- a/lib/lp/soyuz/tests/test_publishing.py
+++ b/lib/lp/soyuz/tests/test_publishing.py
@@ -2207,7 +2207,7 @@ class TestChangeOverride(TestNativePublishingBase):
binary=False,
format=None,
ddeb=False,
- **kwargs
+ **kwargs,
):
self.distroseries.status = status
get_pub_kwargs = {"pocket": pocket, "channel": channel}
@@ -2230,7 +2230,7 @@ class TestChangeOverride(TestNativePublishingBase):
status=SeriesStatus.DEVELOPMENT,
pocket=PackagePublishingPocket.RELEASE,
channel=None,
- **kwargs
+ **kwargs,
):
new_pub = self.setUpOverride(
status=status, pocket=pocket, channel=channel, **kwargs
diff --git a/lib/lp/testing/__init__.py b/lib/lp/testing/__init__.py
index 4e73ec9..4b6e0c6 100644
--- a/lib/lp/testing/__init__.py
+++ b/lib/lp/testing/__init__.py
@@ -898,7 +898,7 @@ class TestCaseWithFactory(TestCase):
product=None,
db_branch=None,
format=None,
- **kwargs
+ **kwargs,
):
"""Create a database branch, bzr branch and bzr checkout.
diff --git a/lib/lp/testing/factory.py b/lib/lp/testing/factory.py
index cc882f1..841baea 100644
--- a/lib/lp/testing/factory.py
+++ b/lib/lp/testing/factory.py
@@ -1265,7 +1265,7 @@ class LaunchpadObjectFactory(ObjectFactory):
sourcepackage=None,
reviewer=None,
target=None,
- **optional_branch_args
+ **optional_branch_args,
):
"""Create and return a new, arbitrary Branch of the given type.
@@ -1399,7 +1399,7 @@ class LaunchpadObjectFactory(ObjectFactory):
distroseries=None,
sourcepackagename=None,
owner=None,
- **kwargs
+ **kwargs,
):
"""Make a package branch on an arbitrary package.
@@ -2059,7 +2059,7 @@ class LaunchpadObjectFactory(ObjectFactory):
registrant=None,
name=None,
information_type=None,
- **optional_repository_args
+ **optional_repository_args,
):
"""Create and return a new, arbitrary GitRepository.
@@ -2151,7 +2151,7 @@ class LaunchpadObjectFactory(ObjectFactory):
ref_pattern="refs/heads/*",
creator=None,
position=None,
- **repository_kwargs
+ **repository_kwargs,
):
"""Create a Git repository access rule."""
if repository is None:
@@ -2171,7 +2171,7 @@ class LaunchpadObjectFactory(ObjectFactory):
can_create=False,
can_push=False,
can_force_push=False,
- **rule_kwargs
+ **rule_kwargs,
):
"""Create a Git repository access grant."""
if rule is None:
@@ -3630,7 +3630,7 @@ class LaunchpadObjectFactory(ObjectFactory):
processor=None,
supports_virtualized=True,
supports_nonvirtualized=True,
- **kwargs
+ **kwargs,
):
if architecturetag is None:
architecturetag = self.getUniqueUnicode("arch")
@@ -5012,7 +5012,7 @@ class LaunchpadObjectFactory(ObjectFactory):
packageupload=None,
spr_creator=None,
channel=None,
- **kwargs
+ **kwargs,
):
"""Make a `SourcePackagePublishingHistory`.
@@ -6091,7 +6091,7 @@ class LaunchpadObjectFactory(ObjectFactory):
status=BuildStatus.NEEDSBUILD,
builder=None,
duration=None,
- **kwargs
+ **kwargs,
):
"""Make a new LiveFSBuild."""
if requester is None:
@@ -6331,7 +6331,7 @@ class LaunchpadObjectFactory(ObjectFactory):
builder=None,
duration=None,
target_architectures=None,
- **kwargs
+ **kwargs,
):
"""Make a new SnapBuild."""
if requester is None:
@@ -6512,7 +6512,7 @@ class LaunchpadObjectFactory(ObjectFactory):
summary=None,
registrant=None,
oci_project=None,
- **kwargs
+ **kwargs,
):
"""Make a new OCIProjectSeries attached to an OCIProject."""
if name is None:
@@ -6589,7 +6589,7 @@ class LaunchpadObjectFactory(ObjectFactory):
builder=None,
duration=None,
build_request=None,
- **kwargs
+ **kwargs,
):
"""Make a new OCIRecipeBuild."""
if requester is None:
@@ -6810,7 +6810,7 @@ class LaunchpadObjectFactory(ObjectFactory):
status=BuildStatus.NEEDSBUILD,
builder=None,
duration=None,
- **kwargs
+ **kwargs,
):
if recipe is None:
if registrant is None:
diff --git a/lib/lp/testing/views.py b/lib/lp/testing/views.py
index 123862c..03578ea 100644
--- a/lib/lp/testing/views.py
+++ b/lib/lp/testing/views.py
@@ -37,7 +37,7 @@ def create_view(
path_info="/",
current_request=False,
rootsite=None,
- **kwargs
+ **kwargs,
):
"""Return a view based on the given arguments.
@@ -106,7 +106,7 @@ def create_initialized_view(
path_info="/",
rootsite=None,
current_request=False,
- **kwargs
+ **kwargs,
):
"""Return a view that has already been initialized."""
if method is None:
diff --git a/pyproject.toml b/pyproject.toml
index c276370..2411fa8 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.black]
line-length = 79
-target-version = ['py35']
+target-version = ['py38']
[tool.mypy]
python_version = "3.8"