diff options
Diffstat (limited to 'git/objects')
-rw-r--r-- | git/objects/submodule/base.py | 14 | ||||
-rw-r--r-- | git/objects/submodule/util.py | 2 |
2 files changed, 8 insertions, 8 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 diff --git a/git/objects/submodule/util.py b/git/objects/submodule/util.py index a776af88..cc1cd60a 100644 --- a/git/objects/submodule/util.py +++ b/git/objects/submodule/util.py @@ -100,7 +100,7 @@ class SubmoduleConfigParser(GitConfigParser): #} END interface #{ Overridden Methods - def write(self) -> None: + def write(self) -> None: # type: ignore[override] rval: None = super(SubmoduleConfigParser, self).write() self.flush_to_index() return rval |