From 291fadd0b2ef341bea8f5d5115aeb778b22bee1e Mon Sep 17 00:00:00 2001 From: Christian Kellner Date: Fri, 10 Jul 2020 10:10:42 +0200 Subject: [PATCH] pylint: increase max attributes to 10 In three places we have more than 7 instances attributes, but less then 10; instead of disabling the warning for all these cases, increase the limit to a reasonable size of 10 and re-enable the warnings in all the places. --- .pylintrc | 3 +++ assemblers/org.osbuild.qemu | 1 - osbuild/objectstore.py | 1 - osbuild/sources.py | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index ce564d6d..1a7c8a30 100644 --- a/.pylintrc +++ b/.pylintrc @@ -4,3 +4,6 @@ max-line-length=120 [TYPECHECK] ignored-classes=osbuild.loop.LoopInfo + +[DESIGN] +max-attributes=10 diff --git a/assemblers/org.osbuild.qemu b/assemblers/org.osbuild.qemu index 257c43d2..dbd50963 100755 --- a/assemblers/org.osbuild.qemu +++ b/assemblers/org.osbuild.qemu @@ -201,7 +201,6 @@ class Filesystem: maker(device, self.uuid, self.label) -# pylint: disable=too-many-instance-attributes class Partition: def __init__(self, pttype: str = None, diff --git a/osbuild/objectstore.py b/osbuild/objectstore.py index 5a292313..3b6529fd 100644 --- a/osbuild/objectstore.py +++ b/osbuild/objectstore.py @@ -40,7 +40,6 @@ def umount(target, lazy=True): subprocess.run(["umount"] + args + [target], check=True) -# pylint: disable=too-many-instance-attributes class Object: def __init__(self, store: "ObjectStore"): self._init = True diff --git a/osbuild/sources.py b/osbuild/sources.py index 254aff15..459188fb 100644 --- a/osbuild/sources.py +++ b/osbuild/sources.py @@ -6,7 +6,6 @@ from .util import jsoncomm class SourcesServer: - # pylint: disable=too-many-instance-attributes def __init__(self, socket_address, libdir, options, cache, output): self.socket_address = socket_address self.libdir = libdir