diff --git a/wa/commands/create.py b/wa/commands/create.py index 641dd880..80583e6f 100644 --- a/wa/commands/create.py +++ b/wa/commands/create.py @@ -22,6 +22,8 @@ import getpass from collections import OrderedDict from distutils.dir_util import copy_tree # pylint: disable=no-name-in-module, import-error +from devlib.utils.types import identifier + from wa import ComplexCommand, SubCommand, pluginloader, settings from wa.framework.target.descriptor import list_target_descriptions from wa.framework.exception import ConfigError, CommandError @@ -29,8 +31,6 @@ from wa.utils.misc import (ensure_directory_exists as _d, capitalize, ensure_file_directory_exists as _f) from wa.utils.serializer import yaml -from devlib.utils.types import identifier - TEMPLATES_DIR = os.path.join(os.path.dirname(__file__), 'templates') diff --git a/wa/framework/target/manager.py b/wa/framework/target/manager.py index c35095e2..e97ec2c0 100644 --- a/wa/framework/target/manager.py +++ b/wa/framework/target/manager.py @@ -15,6 +15,9 @@ import logging +from devlib import Gem5SimulationPlatform +from devlib.utils.misc import memoized + from wa.framework import signal from wa.framework.exception import ExecutionError, TargetError, TargetNotRespondingError from wa.framework.plugin import Parameter @@ -24,9 +27,6 @@ from wa.framework.target.descriptor import (get_target_description, from wa.framework.target.info import get_target_info from wa.framework.target.runtime_parameter_manager import RuntimeParameterManager -from devlib import Gem5SimulationPlatform -from devlib.utils.misc import memoized - class TargetManager(object): """ diff --git a/wa/framework/target/runtime_config.py b/wa/framework/target/runtime_config.py index 503136a7..2728a831 100644 --- a/wa/framework/target/runtime_config.py +++ b/wa/framework/target/runtime_config.py @@ -18,14 +18,15 @@ import time from collections import defaultdict, OrderedDict from copy import copy +from devlib.exception import TargetError +from devlib.utils.misc import unique +from devlib.utils.types import integer + from wa.framework.exception import ConfigError from wa.framework.plugin import Plugin, Parameter from wa.utils.misc import resolve_cpus, resolve_unique_domain_cpus from wa.utils.types import caseless_string, enum -from devlib.exception import TargetError -from devlib.utils.misc import unique -from devlib.utils.types import integer logger = logging.getLogger('RuntimeConfig') diff --git a/wa/framework/workload.py b/wa/framework/workload.py index 9e76738e..4c25b67a 100644 --- a/wa/framework/workload.py +++ b/wa/framework/workload.py @@ -16,6 +16,8 @@ import logging import os import time +from devlib.utils.android import ApkInfo + from wa.framework.plugin import TargetedPlugin, Parameter from wa.framework.resource import (ApkFile, ReventFile, File, loose_version_matching) @@ -24,8 +26,6 @@ from wa.utils.types import ParameterDict from wa.utils.revent import ReventRecorder from wa.utils.exec_control import once_per_instance -from devlib.utils.android import ApkInfo - class Workload(TargetedPlugin): """ diff --git a/wa/utils/misc.py b/wa/utils/misc.py index d4f71921..8b875991 100644 --- a/wa/utils/misc.py +++ b/wa/utils/misc.py @@ -31,7 +31,7 @@ import subprocess import sys import traceback from datetime import datetime, timedelta -from functools import reduce +from functools import reduce # pylint: disable=redefined-builtin from operator import mul if sys.version_info[0] == 3: from io import StringIO @@ -41,9 +41,10 @@ else: from itertools import chain, cycle from distutils.spawn import find_executable # pylint: disable=no-name-in-module, import-error -import yaml from dateutil import tz +import yaml +# pylint: disable=wrong-import-order from devlib.exception import TargetError from devlib.utils.misc import (ABI_MAP, check_output, walk_modules, ensure_directory_exists, ensure_file_directory_exists, diff --git a/wa/utils/revent.py b/wa/utils/revent.py index d94daacb..69ae24d1 100644 --- a/wa/utils/revent.py +++ b/wa/utils/revent.py @@ -20,10 +20,11 @@ import signal from datetime import datetime from collections import namedtuple +from devlib.utils.misc import memoized + from wa.framework.resource import Executable, NO_ONE, ResourceResolver from wa.utils.exec_control import once_per_class -from devlib.utils.misc import memoized GENERAL_MODE = 0 GAMEPAD_MODE = 1 diff --git a/wa/utils/serializer.py b/wa/utils/serializer.py index 4fa7c510..b843b1bb 100644 --- a/wa/utils/serializer.py +++ b/wa/utils/serializer.py @@ -61,9 +61,8 @@ import re import json as _json from collections import OrderedDict from datetime import datetime - -import yaml as _yaml import dateutil.parser +import yaml as _yaml # pylint: disable=redefined-builtin from past.builtins import basestring # pylint: disable=wrong-import-order diff --git a/wa/utils/types.py b/wa/utils/types.py index 39fd4232..ed90b4be 100644 --- a/wa/utils/types.py +++ b/wa/utils/types.py @@ -34,7 +34,7 @@ from bisect import insort if sys.version_info[0] == 3: from urllib.parse import quote, unquote # pylint: disable=no-name-in-module, import-error from past.builtins import basestring # pylint: disable=redefined-builtin - long = int + long = int # pylint: disable=redefined-builtin else: from urllib import quote, unquote # pylint: disable=no-name-in-module # pylint: disable=wrong-import-position @@ -478,6 +478,7 @@ class obj_dict(MutableMapping): def from_pod(pod): return obj_dict(pod) + # pylint: disable=super-init-not-called def __init__(self, values=None, not_in_dict=None): self.__dict__['dict'] = dict(values or {}) self.__dict__['not_in_dict'] = not_in_dict if not_in_dict is not None else []