| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1541c62 commit 1f03e7f
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -42,10 +42,19 @@ | |||
| 42 | 42 | ||
| 43 | 43 | # typing ---------------------------------------------------------------------- | |
| 44 | 44 | ||
| 45 | - from typing import Callable, Dict, Mapping, Sequence, TYPE_CHECKING, cast | ||
| 46 | - from typing import Any, Iterator, Union | ||
| 45 | + from typing import ( | ||
| 46 | + Any, | ||
| 47 | + Callable, | ||
| 48 | + Dict, | ||
| 49 | + Iterator, | ||
| 50 | + Mapping, | ||
| 51 | + Sequence, | ||
| 52 | + TYPE_CHECKING, | ||
| 53 | + Union, | ||
| 54 | + cast, | ||
| 55 | + ) | ||
| 47 | 56 | ||
| 48 | - from git.types import Commit_ish, Literal, Old_commit_ish, PathLike, TBD | ||
| 57 | + from git.types import Commit_ish, Literal, PathLike, TBD | ||
| 49 | 58 | ||
| 50 | 59 | if TYPE_CHECKING: | |
| 51 | 60 | from git.index import IndexFile | |
@@ -113,7 +122,7 @@ def __init__( | |||
| 113 | 122 | mode: Union[int, None] = None, | |
| 114 | 123 | path: Union[PathLike, None] = None, | |
| 115 | 124 | name: Union[str, None] = None, | |
| 116 | - parent_commit: Union[Old_commit_ish, None] = None, | ||
| 125 | + parent_commit: Union["Commit", None] = None, | ||
| 117 | 126 | url: Union[str, None] = None, | |
| 118 | 127 | branch_path: Union[PathLike, None] = None, | |
| 119 | 128 | ) -> None: | |
@@ -145,7 +154,6 @@ def __init__( | |||
| 145 | 154 | if url is not None: | |
| 146 | 155 | self._url = url | |
| 147 | 156 | if branch_path is not None: | |
| 148 | - # assert isinstance(branch_path, str) | ||
| 149 | 157 | self._branch_path = branch_path | |
| 150 | 158 | if name is not None: | |
| 151 | 159 | self._name = name | |
@@ -214,7 +222,7 @@ def __repr__(self) -> str: | |||
| 214 | 222 | ||
| 215 | 223 | @classmethod | |
| 216 | 224 | def _config_parser( | |
| 217 | - cls, repo: "Repo", parent_commit: Union[Old_commit_ish, None], read_only: bool | ||
| 225 | + cls, repo: "Repo", parent_commit: Union["Commit", None], read_only: bool | ||
| 218 | 226 | ) -> SubmoduleConfigParser: | |
| 219 | 227 | """ | |
| 220 | 228 | :return: | |
@@ -265,7 +273,7 @@ def _clear_cache(self) -> None: | |||
| 265 | 273 | # END for each name to delete | |
| 266 | 274 | ||
| 267 | 275 | @classmethod | |
| 268 | - def _sio_modules(cls, parent_commit: Old_commit_ish) -> BytesIO: | ||
| 276 | + def _sio_modules(cls, parent_commit: "Commit") -> BytesIO: | ||
| 269 | 277 | """ | |
| 270 | 278 | :return: | |
| 271 | 279 | Configuration file as :class:`~io.BytesIO` - we only access it through the | |
@@ -278,7 +286,7 @@ def _sio_modules(cls, parent_commit: Old_commit_ish) -> BytesIO: | |||
| 278 | 286 | def _config_parser_constrained(self, read_only: bool) -> SectionConstraint: | |
| 279 | 287 | """:return: Config parser constrained to our submodule in read or write mode""" | |
| 280 | 288 | try: | |
| 281 | - pc: Union["Old_commit_ish", None] = self.parent_commit | ||
| 289 | + pc = self.parent_commit | ||
| 282 | 290 | except ValueError: | |
| 283 | 291 | pc = None | |
| 284 | 292 | # END handle empty parent repository | |
| Back | FazBrowse Home | New Git URL |
0 commit comments