run pylint3 and fixed report

This commit adds a pylint configuration and fixed all found issues.

Signed-off-by: Claudius Heine <ch@denx.de>
This commit is contained in:
Claudius Heine
2017-06-21 13:32:56 +02:00
committed by Daniel Wagner
parent 6bc8e08459
commit 33a21c8d0d
13 changed files with 917 additions and 184 deletions

View File

@@ -19,6 +19,10 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
"""
This module contains a kas plugin that opens a shell within the kas
environment
"""
import subprocess
from kas.config import load_config
@@ -29,6 +33,10 @@ __copyright__ = 'Copyright (c) Siemens AG, 2017'
class Shell:
"""
Implements a kas plugin that opens a shell within the kas environment.
"""
def __init__(self, parser):
sh_prs = parser.add_parser('shell')
@@ -45,6 +53,11 @@ class Shell:
default='')
def run(self, args):
"""
Runs this kas plugin
"""
# pylint: disable= no-self-use
if args.cmd != 'shell':
return False
@@ -63,8 +76,12 @@ class Shell:
class ShellCommand(Command):
"""
This class implements the command that starts a shell.
"""
def __init__(self, cmd):
Command.__init__(self)
super().__init__()
self.cmd = []
if cmd:
self.cmd = cmd