summaryrefslogtreecommitdiff
path: root/git/objects/submodule/base.py
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-07-25 10:22:22 +0800
committerGitHub <noreply@github.com>2021-07-25 10:22:22 +0800
commitc5e6ae25b9169e5ef070d791fb9d620e2357e24e (patch)
tree680964b9eb8cc102cd1e79f8aeadde6620fc0eb6 /git/objects/submodule/base.py
parent0c1446da2d1ce0382cbc65d7a2aad4483783ae74 (diff)
parentbe7bb868279f61d55594059690904baabe30503c (diff)
downloadgitpython-c5e6ae25b9169e5ef070d791fb9d620e2357e24e.tar.gz
Merge pull request #1298 from Yobmod/main
Revert use of Typeguard and therefore typing-extensions==3.10.0.0
Diffstat (limited to 'git/objects/submodule/base.py')
-rw-r--r--git/objects/submodule/base.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/git/objects/submodule/base.py b/git/objects/submodule/base.py
index d5ba118f..29212167 100644
--- a/git/objects/submodule/base.py
+++ b/git/objects/submodule/base.py
@@ -965,13 +965,12 @@ class Submodule(IndexObject, TraversableIterableObj):
# now git config - need the config intact, otherwise we can't query
# information anymore
- writer: Union[GitConfigParser, SectionConstraint]
- with self.repo.config_writer() as writer:
- writer.remove_section(sm_section(self.name))
+ with self.repo.config_writer() as gcp_writer:
+ gcp_writer.remove_section(sm_section(self.name))
- with self.config_writer() as writer:
- writer.remove_section()
+ with self.config_writer() as sc_writer:
+ sc_writer.remove_section()
# END delete configuration
return self
@@ -1024,7 +1023,8 @@ class Submodule(IndexObject, TraversableIterableObj):
return self
@unbare_repo
- def config_writer(self, index: Union['IndexFile', None] = None, write: bool = True) -> SectionConstraint:
+ def config_writer(self, index: Union['IndexFile', None] = None, write: bool = True
+ ) -> SectionConstraint['SubmoduleConfigParser']:
""":return: a config writer instance allowing you to read and write the data
belonging to this submodule into the .gitmodules file.
@@ -1201,7 +1201,7 @@ class Submodule(IndexObject, TraversableIterableObj):
"""
return self._name
- def config_reader(self) -> SectionConstraint:
+ def config_reader(self) -> SectionConstraint[SubmoduleConfigParser]:
"""
:return: ConfigReader instance which allows you to qurey the configuration values
of this submodule, as provided by the .gitmodules file