Commit Diff


commit - 00cc6147c8d60a87b626f52cd846048fc4ab6130
commit + 07211b52071c4554454e1b4ddfa01e697261c813
blob - 33e8a899fdb47d851b24f18f92b9be98fdfe50fc
blob + d9c0e96b5c4cd2808e760ef1adac99036e154919
--- swh/loader/git/dumb.py
+++ swh/loader/git/dumb.py
@@ -41,8 +41,7 @@ fetch_pack_logger = logger.getChild("fetch_pack")
 
 
 class BytesWriter(Protocol):
-    def write(self, data: bytes):
-        ...
+    def write(self, data: bytes): ...
 
 
 def requests_kwargs(kwargs: Dict[str, Any]) -> Dict[str, Any]:
blob - 61caae585da313f38f866d1d2f8ef8bf5b972020
blob + 1de43661b1901398d3fdfde9346b9764a9c75252
--- swh/loader/git/tests/test_from_disk.py
+++ swh/loader/git/tests/test_from_disk.py
@@ -226,18 +226,21 @@ class CommonGitLoaderTests:
             branches={interesting_branch: SNAPSHOT1.branches[interesting_branch]}
         )
 
-        with patch.object(
-            utils,
-            "ignore_branch_name",
-            lambda name: name != interesting_branch,
-        ), patch.object(
-            utils,
-            "filter_refs",
-            lambda refs: {
-                ref_name: utils.HexBytes(target)
-                for ref_name, target in refs.items()
-                if ref_name == interesting_branch
-            },
+        with (
+            patch.object(
+                utils,
+                "ignore_branch_name",
+                lambda name: name != interesting_branch,
+            ),
+            patch.object(
+                utils,
+                "filter_refs",
+                lambda refs: {
+                    ref_name: utils.HexBytes(target)
+                    for ref_name, target in refs.items()
+                    if ref_name == interesting_branch
+                },
+            ),
         ):
             # Ensure that only the interesting branch is loaded
             res = self.loader.load()
blob - 957bb8daae896dc9633b8511cf02bdde7eea4baa
blob + f54b16e13cf779f20295f583fb3e56deec775b9b
--- swh/loader/git/tests/test_loader.py
+++ swh/loader/git/tests/test_loader.py
@@ -72,9 +72,9 @@ class CommonGitLoaderNotFound:
             "swh.loader.git.loader.GitLoader.fetch_pack_from_origin"
         ).side_effect = failure_exception
 
-        self.mocker.patch(
-            "swh.loader.git.loader.dumb.check_protocol"
-        ).side_effect = HTTPError("404 not found")
+        self.mocker.patch("swh.loader.git.loader.dumb.check_protocol").side_effect = (
+            HTTPError("404 not found")
+        )
 
         res = self.loader.load()
         assert res == {"status": "uneventful"}