1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

framework/plugin: Satisfy pylint's nitpicks

This commit is contained in:
Brendan Jackman 2017-12-07 14:58:11 +00:00 committed by marcbonnici
parent feabecd19d
commit 56674aa3a9

View File

@ -83,7 +83,7 @@ class AttributeCollection(object):
def _to_attrcls(self, p):
if not isinstance(p, self._attrcls):
raise ValueError('Invalid attribute value: {}; must be a {}'.format(p, self._attrcls))
if (p.name in self._attrs and not p.override):
if p.name in self._attrs and not p.override:
raise ValueError('Attribute {} has already been defined.'.format(p.name))
return p
@ -111,7 +111,7 @@ class AliasCollection(AttributeCollection):
super(AliasCollection, self).__init__(Alias)
def _to_attrcls(self, p):
if isinstance(p, tuple) or isinstance(p, list):
if isinstance(p, (list, tuple)):
# must be in the form (name, {param: value, ...})
p = self._attrcls(p[1], **p[1])
elif not isinstance(p, self._attrcls):