We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8469a12 commit a9756bcCopy full SHA for a9756bc
2 files changed
git/config.py
@@ -766,7 +766,7 @@ def _assure_writable(self, method_name: str) -> None:
766
if self.read_only:
767
raise IOError("Cannot execute non-constant method %s.%s" % (self, method_name))
768
769
- def add_section(self, section: str | cp._UNNAMED_SECTION) -> None:
+ def add_section(self, section: "cp._SectionName") -> None:
770
"""Assures added options will stay in order."""
771
return super().add_section(section)
772
git/objects/submodule/base.py
@@ -25,7 +25,6 @@
25
)
26
from git.objects.base import IndexObject, Object
27
from git.objects.util import TraversableIterableObj
28
-from ...refs.remote import RemoteReference
29
from git.util import (
30
IterableList,
31
RemoteProgress,
@@ -67,7 +66,7 @@
67
66
if TYPE_CHECKING:
68
from git.index import IndexFile
69
from git.objects.commit import Commit
70
- from git.refs import Head
+ from git.refs import Head, RemoteReference
71
from git.repo import Repo
72
73
# -----------------------------------------------------------------------------
@@ -356,7 +355,7 @@ def _clone_repo(
356
355
module_checkout_path = osp.join(str(repo.working_tree_dir), path)
357
358
if url.startswith("../"):
359
- remote_name = cast(RemoteReference, repo.active_branch.tracking_branch()).remote_name
+ remote_name = cast("RemoteReference", repo.active_branch.tracking_branch()).remote_name
360
repo_remote_url = repo.remote(remote_name).url
361
url = os.path.join(repo_remote_url, url)
362
0 commit comments