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

Updated pylint for v1.5.1

Fixed WA for the latest version of pylint (1.5.1)
This commit is contained in:
Sebastian Goscik
2015-12-09 15:43:35 +00:00
parent 344bc519c4
commit bef8fb40ef
35 changed files with 86 additions and 102 deletions

View File

@@ -16,13 +16,12 @@
import os
from copy import copy
from collections import OrderedDict, defaultdict
import yaml
from wlauto.exceptions import ConfigError
from wlauto.utils.misc import load_struct_from_yaml, LoadSyntaxError
from wlauto.utils.types import counter, reset_counter
import yaml
def get_aliased_param(d, aliases, default=None, pop=True):
alias_map = [i for i, a in enumerate(aliases) if a in d]

View File

@@ -303,7 +303,7 @@ class Device(Extension):
params = OrderedDict((k.lower(), v) for k, v in params.iteritems() if v is not None)
expected_keys = rtp_map.keys()
if not set(params.keys()) <= set(expected_keys):
if not set(params.keys()).issubset(set(expected_keys)):
unknown_params = list(set(params.keys()).difference(set(expected_keys)))
raise ConfigError('Unknown runtime parameter(s): {}'.format(unknown_params))
@@ -447,4 +447,3 @@ class Device(Extension):
except Exception as e:
self.ping()
raise e

View File

@@ -18,6 +18,7 @@ import sys
import argparse
import logging
import subprocess
import warnings
from wlauto.core.bootstrap import settings
from wlauto.core.extension_loader import ExtensionLoader
@@ -28,7 +29,6 @@ from wlauto.utils.cli import init_argument_parser
from wlauto.utils.doc import format_body
import warnings
warnings.filterwarnings(action='ignore', category=UserWarning, module='zope')
@@ -89,4 +89,3 @@ def main():
logging.critical(tb)
logging.critical('{}({})'.format(e.__class__.__name__, e))
sys.exit(2)

View File

@@ -80,7 +80,7 @@ class GlobalParameterAlias(object):
other_param.kind != param.kind):
message = 'Duplicate global alias {} declared in {} and {} extensions with different types'
raise LoaderError(message.format(self.name, ext.name, other_ext.name))
if not param.name == other_param.name:
if param.name != other_param.name:
message = 'Two params {} in {} and {} in {} both declare global alias {}'
raise LoaderError(message.format(param.name, ext.name,
other_param.name, other_ext.name, self.name))
@@ -320,7 +320,7 @@ class ExtensionLoader(object):
if should_skip:
continue
for fname in files:
if not os.path.splitext(fname)[1].lower() == '.py':
if os.path.splitext(fname)[1].lower() != '.py':
continue
filepath = os.path.join(root, fname)
try:
@@ -401,4 +401,3 @@ def _instantiate(cls, args=None, kwargs=None):
return cls(*args, **kwargs)
except Exception:
raise LoaderError('Could not load {}'.format(cls), sys.exc_info())