浏览代码

Fix formatting with Ruff via `make fix`

David Lakin 10 月之前
父节点
当前提交
bf896a619d

+ 1 - 0
fuzzing/fuzz-targets/fuzz_bundle.py

@@ -6,6 +6,7 @@ import atheris
 with atheris.instrument_imports():
     # We instrument `test_utils` as well, so it doesn't block coverage analysis in Fuzz Introspector:
     from test_utils import EnhancedFuzzedDataProvider, is_expected_exception
+
     from dulwich.bundle import Bundle, read_bundle, write_bundle
     from dulwich.pack import PackData, write_pack_objects
 

+ 1 - 1
fuzzing/fuzz-targets/fuzz_configfile.py

@@ -1,8 +1,8 @@
 import sys
 from io import BytesIO
-from test_utils import is_expected_exception
 
 import atheris
+from test_utils import is_expected_exception
 
 with atheris.instrument_imports():
     from dulwich.config import ConfigFile

+ 4 - 3
fuzzing/fuzz-targets/fuzz_object_store.py

@@ -1,5 +1,5 @@
-import sys
 import stat
+import sys
 from io import BytesIO
 
 import atheris
@@ -7,12 +7,13 @@ import atheris
 with atheris.instrument_imports():
     # We instrument `test_utils` as well, so it doesn't block coverage analysis in Fuzz Introspector:
     from test_utils import EnhancedFuzzedDataProvider, is_expected_exception
-    from dulwich.objects import Blob, Tree, Commit, S_IFGITLINK
+
     from dulwich.errors import ObjectFormatException
+    from dulwich.objects import S_IFGITLINK, Blob, Commit, Tree
     from dulwich.patch import write_tree_diff
     from dulwich.repo import (
-        MemoryRepo,
         InvalidUserIdentity,
+        MemoryRepo,
     )
 
 

+ 3 - 2
fuzzing/fuzz-targets/fuzz_repo.py

@@ -1,5 +1,5 @@
-import sys
 import os
+import sys
 import tempfile
 
 import atheris
@@ -7,9 +7,10 @@ import atheris
 with atheris.instrument_imports():
     # We instrument `test_utils` as well, so it doesn't block coverage analysis in Fuzz Introspector:
     from test_utils import EnhancedFuzzedDataProvider
+
     from dulwich.repo import (
-        Repo,
         InvalidUserIdentity,
+        Repo,
     )
 
 

+ 3 - 3
fuzzing/fuzz-targets/test_utils.py

@@ -1,6 +1,7 @@
-import atheris  # pragma: no cover
 from typing import List  # pragma: no cover
 
+import atheris  # pragma: no cover
+
 
 @atheris.instrument_func
 def is_expected_exception(
@@ -8,7 +9,7 @@ def is_expected_exception(
 ):  # pragma: no cover
     """Checks if the message of a given exception matches any of the expected error messages.
 
-     Args:
+    Args:
          error_message_list (List[str]): A list of error message substrings to check against the exception's message.
          exception (Exception): The exception object raised during execution.
 
@@ -82,5 +83,4 @@ class EnhancedFuzzedDataProvider(atheris.FuzzedDataProvider):  # pragma: no cove
         Returns:
           int: An integer.
         """
-
         return self.ConsumeIntInRange(minimum, maximum)