Skip to content

Commit 9400246

Browse files
committed
Fix IndexFile forwardref
1 parent 16f0607 commit 9400246

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

‎git/objects/submodule/base.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
from unittest import SkipTest
88
import uuid
99

10-
from git import IndexFile
11-
1210
import git
1311
from git.cmd import Git
1412
from git.compat import (
@@ -58,6 +56,7 @@
5856

5957
if TYPE_CHECKING:
6058
from git.repo import Repo
59+
from git.index import IndexFile
6160

6261

6362
# -----------------------------------------------------------------------------
@@ -1012,7 +1011,7 @@ def set_parent_commit(self, commit: Union[Commit_ish, None], check: bool = True)
10121011
return self
10131012

10141013
@unbare_repo
1015-
def config_writer(self, index: Union[IndexFile, None] = None, write: bool = True) -> SectionConstraint:
1014+
def config_writer(self, index: Union['IndexFile', None] = None, write: bool = True) -> SectionConstraint:
10161015
""":return: a config writer instance allowing you to read and write the data
10171016
belonging to this submodule into the .gitmodules file.
10181017

‎git/types.py

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@
3636

3737
Lit_config_levels = Literal['system', 'global', 'user', 'repository']
3838

39-
T = TypeVar('T', bound=Literal['system', 'global', 'user', 'repository'], covariant=True)
40-
4139

4240
class ConfigLevels_NT(NamedTuple):
4341
"""NamedTuple of allowed CONFIG_LEVELS"""

0 commit comments

Comments
 (0)