diff options
author | Sergei Trofimov <sergei.trofimov@arm.com> | 2018-07-09 15:28:22 +0100 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2018-07-09 15:59:40 +0100 |
commit | c410d2e1a1fdd8198e31ec0cd7fa4130368463c2 (patch) | |
tree | 8cd02642544128baf025e536ba83f1c0ba8c2ad5 /wa/framework | |
parent | 0e0d4e0ff0429fced20842b19b9e3fc31b237e81 (diff) |
I lint, therefore I am
Implement fixes for the most recent pylint version.
Diffstat (limited to 'wa/framework')
-rw-r--r-- | wa/framework/exception.py | 2 | ||||
-rw-r--r-- | wa/framework/execution.py | 10 | ||||
-rw-r--r-- | wa/framework/instrument.py | 4 | ||||
-rw-r--r-- | wa/framework/workload.py | 21 |
4 files changed, 18 insertions, 19 deletions
diff --git a/wa/framework/exception.py b/wa/framework/exception.py index 4a6cff2e..ee17a50e 100644 --- a/wa/framework/exception.py +++ b/wa/framework/exception.py @@ -13,7 +13,7 @@ # limitations under the License. # # pylint: disable=unused-import -from devlib.exception import (DevlibError, HostError, TimeoutError, +from devlib.exception import (DevlibError, HostError, TimeoutError, # pylint: disable=redefined-builtin TargetError, TargetNotRespondingError) from wa.utils.misc import get_traceback diff --git a/wa/framework/execution.py b/wa/framework/execution.py index 9e1d99fb..1c80f181 100644 --- a/wa/framework/execution.py +++ b/wa/framework/execution.py @@ -26,7 +26,7 @@ import wa.framework.signal as signal from wa.framework import instrument from wa.framework.configuration.core import Status from wa.framework.exception import TargetError, HostError, WorkloadError -from wa.framework.exception import TargetNotRespondingError, TimeoutError +from wa.framework.exception import TargetNotRespondingError, TimeoutError # pylint: disable=redefined-builtin from wa.framework.job import Job from wa.framework.output import init_job_output from wa.framework.output_processor import ProcessorManager @@ -437,11 +437,11 @@ class Executor(object): self.logger.info('Results can be found in {}'.format(output.basepath)) if self.error_logged: - self.logger.warn('There were errors during execution.') - self.logger.warn('Please see {}'.format(output.logfile)) + self.logger.warning('There were errors during execution.') + self.logger.warning('Please see {}'.format(output.logfile)) elif self.warning_logged: - self.logger.warn('There were warnings during execution.') - self.logger.warn('Please see {}'.format(output.logfile)) + self.logger.warning('There were warnings during execution.') + self.logger.warning('Please see {}'.format(output.logfile)) def _error_signalled_callback(self, _): self.error_logged = True diff --git a/wa/framework/instrument.py b/wa/framework/instrument.py index f5e5e76a..d13f63e7 100644 --- a/wa/framework/instrument.py +++ b/wa/framework/instrument.py @@ -104,7 +104,7 @@ from collections import OrderedDict from wa.framework import signal from wa.framework.plugin import Plugin -from wa.framework.exception import (TargetNotRespondingError, TimeoutError, +from wa.framework.exception import (TargetNotRespondingError, TimeoutError, # pylint: disable=redefined-builtin WorkloadError, TargetError) from wa.utils.log import log_error from wa.utils.misc import isiterable @@ -324,7 +324,7 @@ def install(instrument, context): if not callable(attr): msg = 'Attribute {} not callable in {}.' raise ValueError(msg.format(attr_name, instrument)) - argspec = inspect.getargspec(attr) + argspec = inspect.getfullargspec(attr) arg_num = len(argspec.args) # Instrument callbacks will be passed exactly two arguments: self # (the instrument instance to which the callback is bound) and diff --git a/wa/framework/workload.py b/wa/framework/workload.py index f2c655b5..9e76738e 100644 --- a/wa/framework/workload.py +++ b/wa/framework/workload.py @@ -16,8 +16,7 @@ import logging import os import time -from wa import Parameter -from wa.framework.plugin import TargetedPlugin +from wa.framework.plugin import TargetedPlugin, Parameter from wa.framework.resource import (ApkFile, ReventFile, File, loose_version_matching) from wa.framework.exception import WorkloadError, ConfigError @@ -78,7 +77,7 @@ class Workload(TargetedPlugin): raise WorkloadError(msg.format(self.name, ' '.join(self.supported_platforms), self.target.os)) - def init_resources(self, resolver): + def init_resources(self, context): """ This method may be used to perform early resource discovery and initialization. This is invoked during the initial loading stage and @@ -88,7 +87,7 @@ class Workload(TargetedPlugin): """ for asset in self.deployable_assets: - self.asset_files.append(resolver.get(File(self, asset))) + self.asset_files.append(context.get(File(self, asset))) @once_per_instance def initialize(self, context): @@ -298,9 +297,9 @@ class ApkUIWorkload(ApkWorkload): super(ApkUIWorkload, self).__init__(target, **kwargs) self.gui = None - def init_resources(self, resolver): - super(ApkUIWorkload, self).init_resources(resolver) - self.gui.init_resources(resolver) + def init_resources(self, context): + super(ApkUIWorkload, self).init_resources(context) + self.gui.init_resources(context) @once_per_instance def initialize(self, context): @@ -378,9 +377,9 @@ class UIWorkload(Workload): super(UIWorkload, self).__init__(target, **kwargs) self.gui = None - def init_resources(self, resolver): - super(UIWorkload, self).init_resources(resolver) - self.gui.init_resources(resolver) + def init_resources(self, context): + super(UIWorkload, self).init_resources(context) + self.gui.init_resources(context) @once_per_instance def initialize(self, context): @@ -819,7 +818,7 @@ class PackageHandler(object): if 'Failure' in output: if 'ALREADY_EXISTS' in output: msg = 'Using already installed APK (did not uninstall properly?)' - self.logger.warn(msg) + self.logger.warning(msg) else: raise WorkloadError(output) else: |