From b5347fb6cc8d0c2714c407efef3f7571787d181d Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Fri, 3 Jan 2025 08:01:14 +0100 Subject: [PATCH] fix: python 2.12 support --- pyproject.toml | 2 +- tiramisu_cmdline_parser/api.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 677bce9..682cd3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,5 +37,5 @@ name = "cz_conventional_commits" tag_format = "$version" version_scheme = "pep440" version_provider = "pep621" -#update_changelog_on_bump = true +update_changelog_on_bump = true changelog_merge_prerelease = true diff --git a/tiramisu_cmdline_parser/api.py b/tiramisu_cmdline_parser/api.py index b11dd12..eb293c1 100644 --- a/tiramisu_cmdline_parser/api.py +++ b/tiramisu_cmdline_parser/api.py @@ -374,9 +374,9 @@ class TiramisuCmdlineParser(ArgumentParser): return self.prefix_chars + 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: - namespace_, args_ = super()._parse_known_args(args, namespace) + namespace_, args_ = super()._parse_known_args(args, namespace, *others) except (ValueError, LeadershipError, AttributeError) as err: self.error(err) if args != args_ and args_ and args_[0].startswith(self.prefix_chars): @@ -397,7 +397,7 @@ class TiramisuCmdlineParser(ArgumentParser): fullpath=self.fullpath, ) namespace_, args_ = new_parser._parse_known_args( - args_, new_parser.namespace + args_, new_parser.namespace, *others ) else: if self._registries["action"]["help"].needs: