1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-25 01:16:14 +01:00

build: Mute pylint error E1101: Instance of 'Pac' has no '<attr>' member (no-member)

This commit is contained in:
Daniel Mach 2023-01-20 16:16:06 +01:00
parent dd64cf1fae
commit d941cc4d57

View File

@ -221,6 +221,14 @@ class Pac:
def __init__(self, node, buildarch, pacsuffix, apiurl, localpkgs=None):
localpkgs = localpkgs or []
# set attributes to mute pylint error E1101: Instance of 'Pac' has no '<attr>' member (no-member)
self.project = None
self.name = None
self.canonname = None
self.repository = None
self.repoarch = None
self.mp = {}
for i in ['binary', 'package',
'epoch', 'version', 'release', 'hdrmd5',
@ -292,7 +300,7 @@ class Pac:
self.urllist = [url % self.mp for url in urllist]
def __str__(self):
return self.name
return self.name or ""
def __repr__(self):
return "%s" % self.name
@ -1181,7 +1189,7 @@ def main(apiurl, opts, argv):
self.cleanup()
def __str__(self):
return self.name
return self.name or ""
old_pkg_dir = mytmpdir(prefix='.build.oldpackages', dir=os.path.abspath(os.curdir))
if not os.path.exists(destdir):