fix: python 2.12 support
This commit is contained in:
parent
5e7c0572c9
commit
b5347fb6cc
2 changed files with 4 additions and 4 deletions
|
@ -37,5 +37,5 @@ name = "cz_conventional_commits"
|
||||||
tag_format = "$version"
|
tag_format = "$version"
|
||||||
version_scheme = "pep440"
|
version_scheme = "pep440"
|
||||||
version_provider = "pep621"
|
version_provider = "pep621"
|
||||||
#update_changelog_on_bump = true
|
update_changelog_on_bump = true
|
||||||
changelog_merge_prerelease = true
|
changelog_merge_prerelease = true
|
||||||
|
|
|
@ -374,9 +374,9 @@ class TiramisuCmdlineParser(ArgumentParser):
|
||||||
return self.prefix_chars + name
|
return self.prefix_chars + name
|
||||||
return self.prefix_chars * 2 + name
|
return self.prefix_chars * 2 + name
|
||||||
|
|
||||||
def _parse_known_args(self, args=None, namespace=None):
|
def _parse_known_args(self, args, namespace, *others):
|
||||||
try:
|
try:
|
||||||
namespace_, args_ = super()._parse_known_args(args, namespace)
|
namespace_, args_ = super()._parse_known_args(args, namespace, *others)
|
||||||
except (ValueError, LeadershipError, AttributeError) as err:
|
except (ValueError, LeadershipError, AttributeError) as err:
|
||||||
self.error(err)
|
self.error(err)
|
||||||
if args != args_ and args_ and args_[0].startswith(self.prefix_chars):
|
if args != args_ and args_ and args_[0].startswith(self.prefix_chars):
|
||||||
|
@ -397,7 +397,7 @@ class TiramisuCmdlineParser(ArgumentParser):
|
||||||
fullpath=self.fullpath,
|
fullpath=self.fullpath,
|
||||||
)
|
)
|
||||||
namespace_, args_ = new_parser._parse_known_args(
|
namespace_, args_ = new_parser._parse_known_args(
|
||||||
args_, new_parser.namespace
|
args_, new_parser.namespace, *others
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
if self._registries["action"]["help"].needs:
|
if self._registries["action"]["help"].needs:
|
||||||
|
|
Loading…
Reference in a new issue