diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-07-25 10:22:22 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-25 10:22:22 +0800 |
commit | c5e6ae25b9169e5ef070d791fb9d620e2357e24e (patch) | |
tree | 680964b9eb8cc102cd1e79f8aeadde6620fc0eb6 /git/objects/submodule | |
parent | 0c1446da2d1ce0382cbc65d7a2aad4483783ae74 (diff) | |
parent | be7bb868279f61d55594059690904baabe30503c (diff) | |
download | gitpython-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')
-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 |