[elbe-devel] [PATCH v2 39/66] projectmanager: Fix Pylint
Olivier Dion
dion at linutronix.de
Fri Jun 5 19:07:03 CEST 2020
60:0: R0205: (useless-object-inheritance)
67:0: R0205: (useless-object-inheritance)
128:16: R1705: (no-else-return)
Signed-off-by: Olivier Dion <dion at linutronix.de>
Reviewed-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/projectmanager.py | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/elbepack/projectmanager.py b/elbepack/projectmanager.py
index 0aca90ff..c03874d5 100644
--- a/elbepack/projectmanager.py
+++ b/elbepack/projectmanager.py
@@ -56,14 +56,16 @@ class InvalidState(ProjectManagerError):
def __init__(self, message):
ProjectManagerError.__init__(self, message)
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
class OpenProjectFile(object):
def __init__(self, pfd, mode='r'):
self.path = path.join(pfd.builddir, pfd.name)
self.mime_type = pfd.mime_type
self.fobj = open(self.path, mode)
-
+# TODO:py3 Remove object inheritance
+# pylint: disable=useless-object-inheritance
class ProjectManager(object):
# pylint: disable=too-many-public-methods
@@ -129,11 +131,10 @@ class ProjectManager(object):
# Same project selected again by the same user, don't do
# anything
return
- else:
- # Already opened by a different user
- raise AlreadyOpen(builddir,
- self.db.get_username(
- self.builddir2userid[builddir]))
+
+ # Already opened by a different user
+ raise AlreadyOpen(builddir,
+ self.db.get_username(self.builddir2userid[builddir]))
# Try to close the old project of the user, if any
self._close_current_project(userid)
--
2.27.0
More information about the elbe-devel
mailing list