From 987db92f3bfc50a36ae5aa35e5e6524ea18eac3a Mon Sep 17 00:00:00 2001 From: Daniel Mach Date: Fri, 20 Jan 2023 13:20:19 +0100 Subject: [PATCH] Mute pylint false-positive errors related to rpm --- osc/babysitter.py | 1 + osc/checker.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/osc/babysitter.py b/osc/babysitter.py index 750e140d..25445a68 100644 --- a/osc/babysitter.py +++ b/osc/babysitter.py @@ -26,6 +26,7 @@ from .util.packagequery import PackageError try: # import as RPMError because the class "error" is too generic + # pylint: disable=E0611 from rpm import error as RPMError except: # if rpm-python isn't installed (we might be on a debian system): diff --git a/osc/checker.py b/osc/checker.py index d539ff0d..347690ba 100644 --- a/osc/checker.py +++ b/osc/checker.py @@ -19,6 +19,7 @@ class Checker: import rpm self.dbdir = mkdtemp(prefix='oscrpmdb') self.imported = {} + # pylint: disable=E1101 rpm.addMacro('_dbpath', self.dbdir) self.ts = rpm.TransactionSet() self.ts.initDB() @@ -29,6 +30,7 @@ class Checker: def readkeys(self, keys=None): import rpm keys = keys or [] + # pylint: disable=E1101 rpm.addMacro('_dbpath', self.dbdir) for key in keys: try: @@ -40,6 +42,7 @@ class Checker: raise KeyError('', "no key imported") import rpm + # pylint: disable=E1101 rpm.delMacro("_dbpath") # python is an idiot