[elbe-devel] [PATCH 16/25] pylint: disable too-many-instance variables
Torben Hohn
torben.hohn at linutronix.de
Wed Aug 22 10:42:17 CEST 2018
"pylint -f parseable -d all -e R0902 elbepack" complains:
------------------------------------------------------------------------------------------------------------------------------
************* Module elbepack.elbeproject
elbepack/elbeproject.py:104: [R0902(too-many-instance-attributes), ElbeProject] Too many instance attributes (28/7)
************* Module elbepack.updated
elbepack/updated.py:43: [R0902(too-many-instance-attributes), UpdateStatus] Too many instance attributes (9/7)
************* Module elbepack.repomanager
elbepack/repomanager.py:56: [R0902(too-many-instance-attributes), RepoBase] Too many instance attributes (11/7)
************* Module elbepack.fstab
elbepack/fstab.py:71: [R0902(too-many-instance-attributes), fstabentry] Too many instance attributes (8/7)
************* Module elbepack.aptpkgutils
elbepack/aptpkgutils.py:75: [R0902(too-many-instance-attributes), PackageBase] Too many instance attributes (9/7)
************* Module elbepack.debianize.base
elbepack/debianize/base.py:21: [R0902(too-many-instance-attributes), DebianizeBase] Too many instance attributes (12/7)
************* Module elbepack.debianize.kernel
elbepack/debianize/kernel.py:18: [R0902(too-many-instance-attributes), Kernel] Too many instance attributes (9/7)
------------------------------------------------------------------------------------------------------------------------------
locally disable them.
Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
elbepack/aptpkgutils.py | 3 +++
elbepack/debianize/base.py | 2 ++
elbepack/debianize/kernel.py | 2 ++
elbepack/elbeproject.py | 3 +++
elbepack/fstab.py | 3 +++
elbepack/repomanager.py | 3 +++
elbepack/updated.py | 3 +++
7 files changed, 19 insertions(+)
diff --git a/elbepack/aptpkgutils.py b/elbepack/aptpkgutils.py
index 989d27fc..a5303dfb 100644
--- a/elbepack/aptpkgutils.py
+++ b/elbepack/aptpkgutils.py
@@ -73,6 +73,9 @@ def pkgorigin(pkg):
class PackageBase(object):
+
+ # pylint: disable=too-many-instance-attributes
+
def __init__(self, name, installed_version,
candidate_version, installed_md5, candidate_md5,
state, is_auto_installed, origin, architecture):
diff --git a/elbepack/debianize/base.py b/elbepack/debianize/base.py
index 7d9d6781..fbae693c 100644
--- a/elbepack/debianize/base.py
+++ b/elbepack/debianize/base.py
@@ -20,6 +20,8 @@ from elbepack.templates import template
class DebianizeBase (FormMultiPage):
+ # pylint: disable=too-many-instance-attributes
+
srctypes = {}
@classmethod
diff --git a/elbepack/debianize/kernel.py b/elbepack/debianize/kernel.py
index 74d82ec7..5a6d0d4e 100644
--- a/elbepack/debianize/kernel.py
+++ b/elbepack/debianize/kernel.py
@@ -17,6 +17,8 @@ from elbepack.debianize.base import DebianizeBase, template
class Kernel (DebianizeBase):
+ # pylint: disable=too-many-instance-attributes
+
name = "kernel"
files = ['Kbuild', 'Kconfig', 'MAINTAINERS', 'kernel/futex.c']
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index a426481c..8fd4541d 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -102,6 +102,9 @@ def gen_sdk_scripts(triplet, prj_name, prj_version, builddir, sdkpath):
class ElbeProject (object):
+
+ # pylint: disable=too-many-instance-attributes
+
def __init__(
self,
builddir,
diff --git a/elbepack/fstab.py b/elbepack/fstab.py
index ed0a10a0..7d5f792c 100644
--- a/elbepack/fstab.py
+++ b/elbepack/fstab.py
@@ -69,6 +69,9 @@ class mountpoint_dict (dict):
class fstabentry(object):
+
+ # pylint: disable=too-many-instance-attributes
+
def __init__(self, xml, entry, id=0):
if entry.has("source"):
self.source = entry.text("source")
diff --git a/elbepack/repomanager.py b/elbepack/repomanager.py
index 2df62cff..0eff0761 100644
--- a/elbepack/repomanager.py
+++ b/elbepack/repomanager.py
@@ -54,6 +54,9 @@ class RepoAttributes(object):
class RepoBase(object):
+
+ # pylint: disable=too-many-instance-attributes
+
def __init__(
self,
path,
diff --git a/elbepack/updated.py b/elbepack/updated.py
index 17597658..5f9ce253 100644
--- a/elbepack/updated.py
+++ b/elbepack/updated.py
@@ -41,6 +41,9 @@ except ImportError:
class UpdateStatus:
+
+ # pylint: disable=too-many-instance-attributes
+
def __init__(self):
self.monitor = None
self.observer = None
--
2.11.0
More information about the elbe-devel
mailing list