Jelajahi Sumber

Ruff format

Jelmer Vernooij 5 bulan lalu
induk
melakukan
645449ee43
2 mengubah file dengan 18 tambahan dan 5 penghapusan
  1. 3 3
      dulwich/__init__.py
  2. 15 2
      dulwich/index.py

+ 3 - 3
dulwich/__init__.py

@@ -45,8 +45,8 @@ except ImportError:
     # if dissolve is not installed, then just provide a basic implementation
     # of its replace_me decorator
     def replace_me(
-        since: Optional[Union[str, tuple[int, ...]]] = None, 
-        remove_in: Optional[Union[str, tuple[int, ...]]] = None
+        since: Optional[Union[str, tuple[int, ...]]] = None,
+        remove_in: Optional[Union[str, tuple[int, ...]]] = None,
     ):
         def decorator(func):
             import functools
@@ -55,7 +55,7 @@ except ImportError:
             m = f"{func.__name__} is deprecated"
             since_str = str(since) if since is not None else None
             remove_in_str = str(remove_in) if remove_in is not None else None
-            
+
             if since_str is not None and remove_in_str is not None:
                 m += f" since {since_str} and will be removed in {remove_in_str}"
             elif since_str is not None:

+ 15 - 2
dulwich/index.py

@@ -1735,7 +1735,14 @@ def _check_file_matches(
         return False
 
 
-def _transition_to_submodule(repo: "Repo", path: bytes, full_path: bytes, current_stat: Optional[os.stat_result], entry: IndexEntry, index: Index) -> None:
+def _transition_to_submodule(
+    repo: "Repo",
+    path: bytes,
+    full_path: bytes,
+    current_stat: Optional[os.stat_result],
+    entry: IndexEntry,
+    index: Index,
+) -> None:
     """Transition any type to submodule."""
     from .submodule import ensure_submodule_placeholder
 
@@ -1843,7 +1850,13 @@ def _transition_to_file(
     index[path] = index_entry_from_stat(st, entry.sha)
 
 
-def _transition_to_absent(repo: "Repo", path: bytes, full_path: bytes, current_stat: Optional[os.stat_result], index: Index) -> None:
+def _transition_to_absent(
+    repo: "Repo",
+    path: bytes,
+    full_path: bytes,
+    current_stat: Optional[os.stat_result],
+    index: Index,
+) -> None:
     """Remove any type of entry."""
     if current_stat is None:
         return