[elbe-devel] [PATCH 19/25] pylint: add abstract methods for "action" interfaces

Torben Hohn torben.hohn at linutronix.de
Wed Aug 22 10:42:20 CEST 2018


pylint complains:
-------------------------------------------------------------------------------------------------------------------------------
************* Module elbepack.finetuning
elbepack/finetuning.py:475: [E1101(no-member), do_finetuning] Instance of 'FinetuningAction' has no 'execute' member
************* Module elbepack.commands.pbuilder
elbepack/commands/pbuilder.py:59: [E1101(no-member), run_command] Instance of 'PBuilderAction' has no 'execute' member
************* Module elbepack.commands.prjrepo
elbepack/commands/prjrepo.py:133: [E1101(no-member), run_command] Instance of 'RepoAction' has no 'execute' member
************* Module elbepack.commands.initvm
elbepack/commands/initvm.py:88: [E1101(no-member), run_command] Instance of 'InitVMAction' has no 'execute' member
************* Module elbepack.commands.db
elbepack/commands/db.py:19: [E1101(no-member), run_command] Instance of 'DbAction' has no 'execute' member
************* Module elbepack.commands.control
elbepack/commands/control.py:164: [E1101(no-member), run_command] Instance of 'ClientAction' has no 'execute' member
************* Module elbepack.daemons.soap.esoap
************* Module elbepack.debianize.base
elbepack/debianize/base.py:92: [E1101(no-member), DebianizeBase.create] Instance of 'DebianizeBase' has no 'gui' member
elbepack/debianize/base.py:113: [E1101(no-member), DebianizeBase.on_ok] Instance of 'DebianizeBase' has no 'debianize' member
elbepack/debianize/base.py:123: [E1101(no-member), DebianizeBase.on_ok] Instance of 'DebianizeBase' has no 'hint' member
elbepack/debianize/base.py:124: [E1101(no-member), DebianizeBase.on_ok] Instance of 'DebianizeBase' has no 'hint' member
-------------------------------------------------------------------------------------------------------------------------------

Add abstract methods raising NotImplementedError, so that pylint
sees that these methods exist.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/dbaction.py       | 3 +++
 elbepack/debianize/base.py | 8 ++++++++
 elbepack/finetuning.py     | 2 ++
 elbepack/initvmaction.py   | 3 +++
 elbepack/pbuilderaction.py | 3 +++
 elbepack/soapclient.py     | 5 +++++
 6 files changed, 24 insertions(+)

diff --git a/elbepack/dbaction.py b/elbepack/dbaction.py
index ef763644..a67d2d9c 100644
--- a/elbepack/dbaction.py
+++ b/elbepack/dbaction.py
@@ -36,6 +36,9 @@ class DbAction(object):
     def __init__(self, node):
         self.node = node
 
+    def execute(self, _args):
+        raise NotImplementedError('execute() not implemented')
+
 
 class InitAction(DbAction):
     tag = 'init'
diff --git a/elbepack/debianize/base.py b/elbepack/debianize/base.py
index fbae693c..470c8b16 100644
--- a/elbepack/debianize/base.py
+++ b/elbepack/debianize/base.py
@@ -53,8 +53,16 @@ class DebianizeBase (FormMultiPage):
             "unstable",
             "experimental"]
 
+        self.hint = None
+
         FormMultiPage.__init__(self)
 
+    def gui(self):
+        raise NotImplementedError('gui() not implemented')
+
+    def debianize(self):
+        raise NotImplementedError('gui() not implemented')
+
     def create(self):
         self.p_name = self.add_widget_intelligent(TitleText,
                                                   name="Name:", value="elbe")
diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index 0ccdae7d..c9071ab4 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -35,6 +35,8 @@ class FinetuningAction(object):
     def __init__(self, node):
         self.node = node
 
+    def execute(self, _log, _buildenv, _target):
+        raise NotImplementedError('execute() not implemented')
 
 class RmAction(FinetuningAction):
 
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 4c65bb87..aea75fc7 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -115,6 +115,9 @@ class InitVMAction(object):
                 sys.exit(20)
         self.node = node
 
+    def execute(self, _initvmdir, _opt, _args):
+        raise NotImplementedError('execute() not implemented')
+
     def initvm_state(self):
         return self.initvm.info()[0]
 
diff --git a/elbepack/pbuilderaction.py b/elbepack/pbuilderaction.py
index 9e141be0..a530be03 100644
--- a/elbepack/pbuilderaction.py
+++ b/elbepack/pbuilderaction.py
@@ -53,6 +53,9 @@ class PBuilderAction(object):
     def __init__(self, node):
         self.node = node
 
+    def execute(self, _opt, _args):
+        raise NotImplementedError('execute() not implemented')
+
 
 class CreateAction(PBuilderAction):
 
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index beff897c..b8fbc431 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -125,6 +125,9 @@ class ClientAction(object):
     def __init__(self, node):
         self.node = node
 
+    def execute(self, _client, _opt, _args):
+        raise NotImplementedError('execute() not implemented')
+
 
 class RemoveLogAction(ClientAction):
 
@@ -780,6 +783,8 @@ class RepoAction(ClientAction):
         action = cls.repoactiondict[node]
         return object.__new__(action)
 
+    def execute(self, _client, _opt, _args):
+        raise NotImplementedError('execute() not implemented')
 
 class ListPackagesAction(RepoAction):
 
-- 
2.11.0




More information about the elbe-devel mailing list