summaryrefslogtreecommitdiff
path: root/git/objects/submodule/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/objects/submodule/base.py')
-rw-r--r--git/objects/submodule/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index 87a86749..847b4325 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -47,16 +47,16 @@ from .util import (
find_first_remote_branch
)
-from git.repo import Repo
# typing ----------------------------------------------------------------------
-from typing import Callable, Dict, Mapping, Sequence, TYPE_CHECKING
+from typing import Callable, Dict, Mapping, Sequence, TYPE_CHECKING, cast
from typing import Any, Iterator, Union
from git.types import Commit_ish, PathLike, TBD
if TYPE_CHECKING:
from git.index import IndexFile
+ from git.repo import Repo
# -----------------------------------------------------------------------------
@@ -589,7 +589,7 @@ class Submodule(IndexObject, TraversableIterableObj):
if not dry_run:
# see whether we have a valid branch to checkout
try:
- assert isinstance(mrepo, Repo)
+ mrepo = cast('Repo', mrepo)
# find a remote which has our branch - we try to be flexible
remote_branch = find_first_remote_branch(mrepo.remotes, self.branch_name)
local_branch = mkhead(mrepo, self.branch_path)