aboutsummaryrefslogtreecommitdiffstats
path: root/functest/cli/commands/cli_env.py
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-01-23 11:19:41 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-01-24 15:15:34 +0100
commitbbfe9b09d2b1ac7bfe286311fef83d36c6125c96 (patch)
treec11ad97f5672454a3b7e2ba13916034919933e5d /functest/cli/commands/cli_env.py
parentc653ed78d7721b9933e08015e45dd39379aa4316 (diff)
Fix pylint warnings/errors in cli
cli_testcase and cli_tier have been refactored to avoid duplicating code. Then functest/cli and funtest/unit/cli can be added to the list of modules rated 10/10. Change-Id: Iec90e806397248a10f39080ec554e3f0a6eda7c1 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/cli/commands/cli_env.py')
-rw-r--r--functest/cli/commands/cli_env.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/functest/cli/commands/cli_env.py b/functest/cli/commands/cli_env.py
index c41f8f340..c1b66da41 100644
--- a/functest/cli/commands/cli_env.py
+++ b/functest/cli/commands/cli_env.py
@@ -5,7 +5,8 @@
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-#
+
+# pylint: disable=missing-docstring
import click
import prettytable
@@ -15,12 +16,10 @@ from functest.utils.constants import CONST
import six
-class Env(object):
+class Env(object): # pylint: disable=too-few-public-methods
- def __init__(self):
- pass
-
- def show(self):
+ @staticmethod
+ def show():
def _get_value(attr, default='Unknown'):
return attr if attr else default
@@ -44,13 +43,11 @@ class Env(object):
return env_info
-class CliEnv(Env):
-
- def __init__(self):
- super(CliEnv, self).__init__()
+class CliEnv(object): # pylint: disable=too-few-public-methods
- def show(self):
- env_info = super(CliEnv, self).show()
+ @staticmethod
+ def show():
+ env_info = Env.show()
msg = prettytable.PrettyTable(
header_style='upper', padding_width=5,
field_names=['Functest Environment', 'value'])