|
47 | 47 | find_first_remote_branch |
48 | 48 | ) |
49 | 49 |
|
50 | | -fromgit.repoimportRepo |
51 | 50 |
|
52 | 51 | # typing ---------------------------------------------------------------------- |
53 | | -fromtypingimportCallable,Dict,Mapping,Sequence,TYPE_CHECKING |
| 52 | +fromtypingimportCallable,Dict,Mapping,Sequence,TYPE_CHECKING,cast |
54 | 53 | fromtypingimportAny,Iterator,Union |
55 | 54 |
|
56 | 55 | fromgit.typesimportCommit_ish,PathLike,TBD |
57 | 56 |
|
58 | 57 | ifTYPE_CHECKING: |
59 | 58 | fromgit.indeximportIndexFile |
| 59 | +fromgit.repoimportRepo |
60 | 60 |
|
61 | 61 |
|
62 | 62 | # ----------------------------------------------------------------------------- |
@@ -589,7 +589,7 @@ def update(self, recursive: bool = False, init: bool = True, to_latest_revision: |
589 | 589 | ifnotdry_run: |
590 | 590 | # see whether we have a valid branch to checkout |
591 | 591 | try: |
592 | | -assertisinstance(mrepo,Repo) |
| 592 | +mrepo=cast('Repo',mrepo) |
593 | 593 | # find a remote which has our branch - we try to be flexible |
594 | 594 | remote_branch=find_first_remote_branch(mrepo.remotes,self.branch_name) |
595 | 595 | local_branch=mkhead(mrepo,self.branch_path) |
|