commit - cd0ec49d745b8cd3de2170795a4131267161230f
commit + f108d03fa12f3a69e0839fb366bd9eff71dfc9d2
blob - f9eb79992473cc7479ecb8059acbb64a20559a54
blob + 016e70b7f508d521cca802883b38da50f1c59c20
--- dulwich/refs.py
+++ dulwich/refs.py
import os
import warnings
from contextlib import suppress
-from typing import Any, Dict, Optional, Set
+from typing import Any, Dict, Optional, Set, List, Tuple
from .errors import PackedRefsException, RefFormatError
from .file import GitFile, ensure_dir_exists
self.depth = depth
-def parse_symref_value(contents):
+def parse_symref_value(contents: bytes) -> bytes:
"""Parse a symref value.
Args:
"""
raise NotImplementedError(self.read_loose_ref)
- def follow(self, name):
+ def follow(self, name) -> Tuple[List[bytes], bytes]:
"""Follow a reference name.
Returns: a tuple of (refnames, sha), wheres refnames are the names of
def _set_default_branch(
refs: RefsContainer,
origin: bytes,
- origin_head: bytes,
+ origin_head: Optional[bytes],
branch: bytes,
ref_message: Optional[bytes],
) -> bytes: