From b78509527b20a92445f97cd582abf8f2a786991e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Husiaty=C5=84ski?= Date: Tue, 1 Mar 2022 09:08:58 +0100 Subject: [PATCH] Fix linter issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make _cmd_desc a public attribute, so that it can be used outside of the class methods. Signed-off-by: Piotr HusiatyƄski --- podman_compose.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index bdca7fe..fe4779b 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1524,7 +1524,7 @@ class PodmanCompose: subparser = subparsers.add_parser("help", help="show help") for cmd_name, cmd in self.commands.items(): subparser = subparsers.add_parser( - cmd_name, help=cmd._cmd_desc + cmd_name, help=cmd.desc ) # pylint: disable=protected-access for cmd_parser in cmd._parse_args: # pylint: disable=protected-access cmd_parser(subparser) @@ -1610,8 +1610,7 @@ class cmd_run: # pylint: disable=invalid-name,too-few-public-methods return func(*args, **kw) wrapped._compose = self.compose - wrapped._cmd_name = self.cmd_name - wrapped._cmd_desc = self.cmd_desc + wrapped.desc = self.cmd_desc wrapped._parse_args = [] self.compose.commands[self.cmd_name] = wrapped return wrapped