mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-26 01:46:13 +01:00
build: Mute pylint error E1101: Instance of 'Pac' has no '<attr>' member (no-member)
This commit is contained in:
parent
dd64cf1fae
commit
d941cc4d57
12
osc/build.py
12
osc/build.py
@ -221,6 +221,14 @@ class Pac:
|
|||||||
|
|
||||||
def __init__(self, node, buildarch, pacsuffix, apiurl, localpkgs=None):
|
def __init__(self, node, buildarch, pacsuffix, apiurl, localpkgs=None):
|
||||||
localpkgs = localpkgs or []
|
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 = {}
|
self.mp = {}
|
||||||
for i in ['binary', 'package',
|
for i in ['binary', 'package',
|
||||||
'epoch', 'version', 'release', 'hdrmd5',
|
'epoch', 'version', 'release', 'hdrmd5',
|
||||||
@ -292,7 +300,7 @@ class Pac:
|
|||||||
self.urllist = [url % self.mp for url in urllist]
|
self.urllist = [url % self.mp for url in urllist]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name or ""
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "%s" % self.name
|
return "%s" % self.name
|
||||||
@ -1181,7 +1189,7 @@ def main(apiurl, opts, argv):
|
|||||||
self.cleanup()
|
self.cleanup()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return self.name
|
return self.name or ""
|
||||||
|
|
||||||
old_pkg_dir = mytmpdir(prefix='.build.oldpackages', dir=os.path.abspath(os.curdir))
|
old_pkg_dir = mytmpdir(prefix='.build.oldpackages', dir=os.path.abspath(os.curdir))
|
||||||
if not os.path.exists(destdir):
|
if not os.path.exists(destdir):
|
||||||
|
Loading…
Reference in New Issue
Block a user