mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-20 09:40:50 +01:00
wa: Additional pylint fixes
This commit is contained in:
parent
791d9496a7
commit
5714c8e6a1
@ -22,6 +22,8 @@ import getpass
|
|||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from distutils.dir_util import copy_tree # pylint: disable=no-name-in-module, import-error
|
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 import ComplexCommand, SubCommand, pluginloader, settings
|
||||||
from wa.framework.target.descriptor import list_target_descriptions
|
from wa.framework.target.descriptor import list_target_descriptions
|
||||||
from wa.framework.exception import ConfigError, CommandError
|
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)
|
ensure_file_directory_exists as _f)
|
||||||
from wa.utils.serializer import yaml
|
from wa.utils.serializer import yaml
|
||||||
|
|
||||||
from devlib.utils.types import identifier
|
|
||||||
|
|
||||||
|
|
||||||
TEMPLATES_DIR = os.path.join(os.path.dirname(__file__), 'templates')
|
TEMPLATES_DIR = os.path.join(os.path.dirname(__file__), 'templates')
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from devlib import Gem5SimulationPlatform
|
||||||
|
from devlib.utils.misc import memoized
|
||||||
|
|
||||||
from wa.framework import signal
|
from wa.framework import signal
|
||||||
from wa.framework.exception import ExecutionError, TargetError, TargetNotRespondingError
|
from wa.framework.exception import ExecutionError, TargetError, TargetNotRespondingError
|
||||||
from wa.framework.plugin import Parameter
|
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.info import get_target_info
|
||||||
from wa.framework.target.runtime_parameter_manager import RuntimeParameterManager
|
from wa.framework.target.runtime_parameter_manager import RuntimeParameterManager
|
||||||
|
|
||||||
from devlib import Gem5SimulationPlatform
|
|
||||||
from devlib.utils.misc import memoized
|
|
||||||
|
|
||||||
|
|
||||||
class TargetManager(object):
|
class TargetManager(object):
|
||||||
"""
|
"""
|
||||||
|
@ -18,14 +18,15 @@ import time
|
|||||||
from collections import defaultdict, OrderedDict
|
from collections import defaultdict, OrderedDict
|
||||||
from copy import copy
|
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.exception import ConfigError
|
||||||
from wa.framework.plugin import Plugin, Parameter
|
from wa.framework.plugin import Plugin, Parameter
|
||||||
from wa.utils.misc import resolve_cpus, resolve_unique_domain_cpus
|
from wa.utils.misc import resolve_cpus, resolve_unique_domain_cpus
|
||||||
from wa.utils.types import caseless_string, enum
|
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')
|
logger = logging.getLogger('RuntimeConfig')
|
||||||
|
|
||||||
|
@ -16,6 +16,8 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
from devlib.utils.android import ApkInfo
|
||||||
|
|
||||||
from wa.framework.plugin import TargetedPlugin, Parameter
|
from wa.framework.plugin import TargetedPlugin, Parameter
|
||||||
from wa.framework.resource import (ApkFile, ReventFile,
|
from wa.framework.resource import (ApkFile, ReventFile,
|
||||||
File, loose_version_matching)
|
File, loose_version_matching)
|
||||||
@ -24,8 +26,6 @@ from wa.utils.types import ParameterDict
|
|||||||
from wa.utils.revent import ReventRecorder
|
from wa.utils.revent import ReventRecorder
|
||||||
from wa.utils.exec_control import once_per_instance
|
from wa.utils.exec_control import once_per_instance
|
||||||
|
|
||||||
from devlib.utils.android import ApkInfo
|
|
||||||
|
|
||||||
|
|
||||||
class Workload(TargetedPlugin):
|
class Workload(TargetedPlugin):
|
||||||
"""
|
"""
|
||||||
|
@ -31,7 +31,7 @@ import subprocess
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from functools import reduce
|
from functools import reduce # pylint: disable=redefined-builtin
|
||||||
from operator import mul
|
from operator import mul
|
||||||
if sys.version_info[0] == 3:
|
if sys.version_info[0] == 3:
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
@ -41,9 +41,10 @@ else:
|
|||||||
from itertools import chain, cycle
|
from itertools import chain, cycle
|
||||||
from distutils.spawn import find_executable # pylint: disable=no-name-in-module, import-error
|
from distutils.spawn import find_executable # pylint: disable=no-name-in-module, import-error
|
||||||
|
|
||||||
import yaml
|
|
||||||
from dateutil import tz
|
from dateutil import tz
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
# pylint: disable=wrong-import-order
|
||||||
from devlib.exception import TargetError
|
from devlib.exception import TargetError
|
||||||
from devlib.utils.misc import (ABI_MAP, check_output, walk_modules,
|
from devlib.utils.misc import (ABI_MAP, check_output, walk_modules,
|
||||||
ensure_directory_exists, ensure_file_directory_exists,
|
ensure_directory_exists, ensure_file_directory_exists,
|
||||||
|
@ -20,10 +20,11 @@ import signal
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
from devlib.utils.misc import memoized
|
||||||
|
|
||||||
from wa.framework.resource import Executable, NO_ONE, ResourceResolver
|
from wa.framework.resource import Executable, NO_ONE, ResourceResolver
|
||||||
from wa.utils.exec_control import once_per_class
|
from wa.utils.exec_control import once_per_class
|
||||||
|
|
||||||
from devlib.utils.misc import memoized
|
|
||||||
|
|
||||||
GENERAL_MODE = 0
|
GENERAL_MODE = 0
|
||||||
GAMEPAD_MODE = 1
|
GAMEPAD_MODE = 1
|
||||||
|
@ -61,9 +61,8 @@ import re
|
|||||||
import json as _json
|
import json as _json
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import yaml as _yaml
|
|
||||||
import dateutil.parser
|
import dateutil.parser
|
||||||
|
import yaml as _yaml
|
||||||
|
|
||||||
# pylint: disable=redefined-builtin
|
# pylint: disable=redefined-builtin
|
||||||
from past.builtins import basestring # pylint: disable=wrong-import-order
|
from past.builtins import basestring # pylint: disable=wrong-import-order
|
||||||
|
@ -34,7 +34,7 @@ from bisect import insort
|
|||||||
if sys.version_info[0] == 3:
|
if sys.version_info[0] == 3:
|
||||||
from urllib.parse import quote, unquote # pylint: disable=no-name-in-module, import-error
|
from urllib.parse import quote, unquote # pylint: disable=no-name-in-module, import-error
|
||||||
from past.builtins import basestring # pylint: disable=redefined-builtin
|
from past.builtins import basestring # pylint: disable=redefined-builtin
|
||||||
long = int
|
long = int # pylint: disable=redefined-builtin
|
||||||
else:
|
else:
|
||||||
from urllib import quote, unquote # pylint: disable=no-name-in-module
|
from urllib import quote, unquote # pylint: disable=no-name-in-module
|
||||||
# pylint: disable=wrong-import-position
|
# pylint: disable=wrong-import-position
|
||||||
@ -478,6 +478,7 @@ class obj_dict(MutableMapping):
|
|||||||
def from_pod(pod):
|
def from_pod(pod):
|
||||||
return obj_dict(pod)
|
return obj_dict(pod)
|
||||||
|
|
||||||
|
# pylint: disable=super-init-not-called
|
||||||
def __init__(self, values=None, not_in_dict=None):
|
def __init__(self, values=None, not_in_dict=None):
|
||||||
self.__dict__['dict'] = dict(values or {})
|
self.__dict__['dict'] = dict(values or {})
|
||||||
self.__dict__['not_in_dict'] = not_in_dict if not_in_dict is not None else []
|
self.__dict__['not_in_dict'] = not_in_dict if not_in_dict is not None else []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user