From b73a8023a4c601dc8c1dfff63b0225e15eade3c8 Mon Sep 17 00:00:00 2001 From: Konstantin Molchanov Date: Sun, 3 Jun 2018 22:34:46 +0400 Subject: [PATCH 1/3] Make _root not an abstract method. --- cliar/cliar.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cliar/cliar.py b/cliar/cliar.py index 203dfc9..1ec296d 100644 --- a/cliar/cliar.py +++ b/cliar/cliar.py @@ -244,16 +244,15 @@ def parse(self): arg: param for param, arg in self.root_command.arg_map.items() } - try: - self.root_command.handler( + if self.root_command.handler( **{inverse_root_arg_map[arg]: value for arg, value in root_args.items()} - ) - - except NotImplementedError: + ) == NotImplemented: self._parser.print_help() def _root(self): '''The root command, which corresponds to the script being called without any command.''' - raise NotImplementedError + # pylint: disable=no-self-use + + return NotImplemented From fee93d20f6b8a60d68867c326859110992728ab6 Mon Sep 17 00:00:00 2001 From: Konstantin Molchanov Date: Sun, 3 Jun 2018 22:35:55 +0400 Subject: [PATCH 2/3] Update changelog. --- changelog.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.md b/changelog.md index 3908507..13de5d5 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 1.2.2 + +- Make `_root` not an abstract method. + # 1.2.1 - Fix critical bug that disallowed string params. From 96e273d66e8ca69e91974d1c1888450a9ea0037e Mon Sep 17 00:00:00 2001 From: Konstantin Molchanov Date: Sun, 3 Jun 2018 22:42:10 +0400 Subject: [PATCH 3/3] Bump version to 1.2.2. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b764b5e..8d1300a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cliar" -version = "1.2.1" +version = "1.2.2" description = "Create CLIs with classes and type hints." license = "MIT" authors = ["Konstantin Molchanov "]