mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-10-31 15:12:25 +00:00 
			
		
		
		
	Run autoflake to remove unused imports & variables
This commit is contained in:
		
				
					committed by
					
						 marcbonnici
						marcbonnici
					
				
			
			
				
	
			
			
			
						parent
						
							b85098d5b2
						
					
				
				
					commit
					aa2abd16a3
				
			| @@ -13,9 +13,8 @@ | ||||
| # limitations under the License. | ||||
| # | ||||
|  | ||||
| from wa import Command, settings | ||||
| from wa import Command | ||||
| from wa.framework import pluginloader | ||||
| from wa.framework.plugin import PluginLoader | ||||
| from wa.framework.target.descriptor import get_target_descriptions | ||||
| from wa.utils.doc import get_summary | ||||
| from wa.utils.formatter import DescriptionListFormatter | ||||
|   | ||||
| @@ -21,8 +21,7 @@ import shutil | ||||
| import wa | ||||
| from wa import Command, settings | ||||
| from wa.framework import pluginloader | ||||
| from wa.framework.configuration import RunConfiguration | ||||
| from wa.framework.configuration.parsers import AgendaParser, ConfigParser | ||||
| from wa.framework.configuration.parsers import AgendaParser | ||||
| from wa.framework.execution import Executor | ||||
| from wa.framework.output import init_run_output | ||||
| from wa.framework.version import get_wa_version | ||||
|   | ||||
| @@ -1,17 +1,13 @@ | ||||
| import random | ||||
| import logging | ||||
| from itertools import izip_longest, groupby, chain | ||||
|  | ||||
| from wa.framework import pluginloader | ||||
| from wa.framework.configuration.core import (MetaConfiguration, RunConfiguration, | ||||
|                                              JobGenerator, Status, settings) | ||||
| from wa.framework.configuration.parsers import ConfigParser | ||||
| from wa.framework.configuration.plugin_cache import PluginCache | ||||
| from wa.framework.exception import NotFoundError | ||||
| from wa.framework.job import Job | ||||
| from wa.framework.run import JobState | ||||
| from wa.utils import log | ||||
| from wa.utils.types import enum | ||||
|  | ||||
|  | ||||
| class CombinedConfig(object): | ||||
|   | ||||
| @@ -18,7 +18,6 @@ import sys | ||||
| import argparse | ||||
| import logging | ||||
| import os | ||||
| import subprocess | ||||
| import warnings | ||||
|  | ||||
| from wa.framework import pluginloader | ||||
| @@ -26,10 +25,9 @@ from wa.framework.command import init_argument_parser | ||||
| from wa.framework.configuration import settings | ||||
| from wa.framework.configuration.execution import ConfigManager | ||||
| from wa.framework.host import init_user_directory | ||||
| from wa.framework.exception import WAError, DevlibError, ConfigError | ||||
| from wa.framework.exception import ConfigError | ||||
| from wa.utils import log | ||||
| from wa.utils.doc import format_body | ||||
| from wa.utils.misc import get_traceback | ||||
|  | ||||
| warnings.filterwarnings(action='ignore', category=UserWarning, module='zope') | ||||
|  | ||||
|   | ||||
| @@ -16,19 +16,12 @@ | ||||
| # pylint: disable=no-member | ||||
|  | ||||
| import logging | ||||
| import os | ||||
| import random | ||||
| import subprocess | ||||
| import uuid | ||||
| from collections import Counter, defaultdict, OrderedDict | ||||
| from contextlib import contextmanager | ||||
| from copy import copy | ||||
| from datetime import datetime | ||||
| from itertools import izip_longest | ||||
|  | ||||
| import wa.framework.signal as signal | ||||
| from wa.framework import instrumentation, pluginloader | ||||
| from wa.framework.configuration.core import settings, Status | ||||
| from wa.framework import instrumentation | ||||
| from wa.framework.configuration.core import Status | ||||
| from wa.framework.exception import (WAError, ConfigError, TimeoutError, | ||||
|                                     InstrumentError, TargetError, HostError, | ||||
|                                     TargetNotRespondingError, WorkloadError) | ||||
| @@ -36,13 +29,10 @@ from wa.framework.job import Job | ||||
| from wa.framework.output import init_job_output | ||||
| from wa.framework.processor import ProcessorManager | ||||
| from wa.framework.resource import ResourceResolver | ||||
| from wa.framework.run import RunState | ||||
| from wa.framework.target.info import TargetInfo | ||||
| from wa.framework.target.manager import TargetManager | ||||
| from wa.utils import log | ||||
| from wa.utils.misc import (ensure_directory_exists as _d, merge_config_values, | ||||
|                            get_traceback, format_duration) | ||||
| from wa.utils.serializer import json | ||||
|  | ||||
|  | ||||
| class ExecutionContext(object): | ||||
| @@ -276,7 +266,6 @@ class Executor(object): | ||||
|         self.logger = logging.getLogger('executor') | ||||
|         self.error_logged = False | ||||
|         self.warning_logged = False | ||||
|         pluginloader = None | ||||
|         self.target_manager = None | ||||
|         self.device = None | ||||
|  | ||||
|   | ||||
| @@ -19,17 +19,14 @@ This module contains the standard set of resource getters used by Workload Autom | ||||
|  | ||||
| """ | ||||
| import httplib | ||||
| import inspect | ||||
| import json | ||||
| import logging | ||||
| import os | ||||
| import re | ||||
| import shutil | ||||
| import sys | ||||
|  | ||||
| import requests | ||||
|  | ||||
| from devlib.utils.android import ApkInfo | ||||
|  | ||||
| from wa import Parameter, settings, __file__ as _base_filepath | ||||
| from wa.framework.resource import ResourceGetter, SourcePriority, NO_ONE  | ||||
|   | ||||
| @@ -107,7 +107,7 @@ from wa.framework.plugin import Plugin | ||||
| from wa.framework.exception import (WAError, TargetNotRespondingError, TimeoutError, | ||||
|                                     WorkloadError) | ||||
| from wa.utils.log import log_error | ||||
| from wa.utils.misc import get_traceback, isiterable | ||||
| from wa.utils.misc import isiterable | ||||
| from wa.utils.types import identifier, enum, level | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,11 +1,8 @@ | ||||
| import logging | ||||
| import os | ||||
| import shutil | ||||
| import string | ||||
| import sys | ||||
| import uuid | ||||
| from copy import copy | ||||
| from datetime import datetime, timedelta | ||||
| from datetime import datetime | ||||
|  | ||||
| from wa.framework.configuration.core import JobSpec, Status | ||||
| from wa.framework.configuration.execution import ConfigManager | ||||
|   | ||||
| @@ -31,7 +31,7 @@ from wa.framework.exception import (NotFoundError, PluginLoaderError, TargetErro | ||||
| from wa.utils import log | ||||
| from wa.utils.misc import (ensure_directory_exists as _d, walk_modules, load_class,  | ||||
|                            merge_dicts_simple, get_article) | ||||
| from wa.utils.types import identifier, boolean | ||||
| from wa.utils.types import identifier | ||||
|  | ||||
|  | ||||
| MODNAME_TRANS = string.maketrans(':/\\.', '____') | ||||
|   | ||||
| @@ -12,24 +12,19 @@ | ||||
| # See the License for the specific language governing permissions and | ||||
| # limitations under the License. | ||||
| # | ||||
| import glob | ||||
| import inspect | ||||
| import logging | ||||
| import os | ||||
| import re | ||||
| import shutil | ||||
| import sys | ||||
| from collections import defaultdict | ||||
|  | ||||
| from devlib.utils.android import ApkInfo | ||||
|  | ||||
| from wa.framework import pluginloader | ||||
| from wa.framework.plugin import Plugin, Parameter | ||||
| from wa.framework.plugin import Plugin | ||||
| from wa.framework.exception import ResourceError | ||||
| from wa.framework.configuration import settings | ||||
| from wa.utils import log | ||||
| from wa.utils.misc import ensure_directory_exists as _d, get_object_name | ||||
| from wa.utils.types import boolean, prioritylist, enum, list_or_string | ||||
| from wa.utils.misc import get_object_name | ||||
| from wa.utils.types import enum, list_or_string, prioritylist | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -13,7 +13,6 @@ | ||||
| # limitations under the License. | ||||
| # | ||||
| import uuid | ||||
| import logging | ||||
| from collections import OrderedDict, Counter | ||||
| from copy import copy | ||||
| from datetime import datetime, timedelta | ||||
|   | ||||
| @@ -342,8 +342,6 @@ def wrapped(signal_name, sender=dispatcher.Anonymous, safe=False): | ||||
|     """A decorator for wrapping function in signal dispatch.""" | ||||
|     @wrapt.decorator | ||||
|     def signal_wrapped(wrapped, instance, args, kwargs): | ||||
|         func_id = repr(wrapped) | ||||
|  | ||||
|         def signal_wrapper(*args, **kwargs): | ||||
|             with wrap(signal_name, sender, safe): | ||||
|                 return wrapped(*args, **kwargs) | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| from devlib import AndroidTarget | ||||
| from devlib.exception import TargetError | ||||
| from devlib.target import KernelConfig, KernelVersion, Cpuinfo | ||||
| from devlib.utils.android import AndroidProperties | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,4 @@ | ||||
| import logging | ||||
| import os | ||||
|  | ||||
| from wa.framework import signal | ||||
| from wa.framework.plugin import Parameter | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import re | ||||
| from collections import namedtuple | ||||
|  | ||||
| from wa.framework.exception import ConfigError | ||||
|   | ||||
| @@ -27,7 +27,6 @@ from wa.utils.revent import ReventRecorder | ||||
| from wa.utils.exec_control import once_per_instance | ||||
|  | ||||
| from devlib.utils.android import ApkInfo | ||||
| from devlib.exception import TargetError | ||||
|  | ||||
|  | ||||
| class Workload(TargetedPlugin): | ||||
|   | ||||
| @@ -38,10 +38,9 @@ from devlib.exception import TargetError | ||||
| from devlib.utils.android import ApkInfo | ||||
|  | ||||
| from wa import Instrument, Parameter, very_fast | ||||
| from wa.framework import signal | ||||
| from wa.framework.exception import ConfigError | ||||
| from wa.framework.instrumentation import slow | ||||
| from wa.utils.misc import diff_tokens, write_table, check_output, as_relative | ||||
| from wa.utils.misc import as_relative, diff_tokens, write_table | ||||
| from wa.utils.misc import ensure_file_directory_exists as _f | ||||
| from wa.utils.misc import ensure_directory_exists as _d | ||||
| from wa.utils.types import list_of_strings | ||||
|   | ||||
| @@ -17,16 +17,13 @@ | ||||
| # pylint: disable=W0613,E1101 | ||||
| from __future__ import division | ||||
| import os | ||||
| import time | ||||
| import subprocess | ||||
| from collections import defaultdict | ||||
|  | ||||
| from devlib import FtraceCollector | ||||
|  | ||||
| from wa import Instrument, Parameter, Executable | ||||
| from wa import Instrument, Parameter | ||||
| from wa.framework import signal | ||||
| from wa.framework.instrumentation import very_slow | ||||
| from wa.framework.exception import InstrumentError, ConfigError, TargetError | ||||
| from wa.framework.exception import InstrumentError | ||||
| from wa.utils.types import list_of_strings | ||||
| from wa.utils.misc import which | ||||
|  | ||||
|   | ||||
| @@ -15,7 +15,6 @@ | ||||
|  | ||||
|  | ||||
| # pylint: disable=R0201 | ||||
| import os | ||||
| import time | ||||
| from collections import Counter | ||||
|  | ||||
|   | ||||
| @@ -1,4 +1,3 @@ | ||||
| import os | ||||
|  | ||||
| from wa import ResultProcessor | ||||
| from wa.utils.android import LogcatParser | ||||
|   | ||||
| @@ -25,19 +25,15 @@ import re | ||||
| import math | ||||
| import imp | ||||
| import string | ||||
| import threading | ||||
| import signal | ||||
| import subprocess | ||||
| import pkgutil | ||||
| import traceback | ||||
| import logging | ||||
| import random | ||||
| import hashlib | ||||
| from datetime import datetime, timedelta | ||||
| from operator import mul, itemgetter | ||||
| from operator import mul | ||||
| from StringIO import StringIO | ||||
| from itertools import cycle, groupby, chain | ||||
| from functools import partial | ||||
| from itertools import chain, cycle | ||||
| from distutils.spawn import find_executable | ||||
|  | ||||
| import yaml | ||||
|   | ||||
| @@ -27,10 +27,8 @@ fact that Python is not the best language to use for configuration. | ||||
| """ | ||||
| import os | ||||
| import re | ||||
| import math | ||||
| import numbers | ||||
| import shlex | ||||
| import string | ||||
| from bisect import insort | ||||
| from urllib import quote, unquote | ||||
| from collections import defaultdict, MutableMapping | ||||
| @@ -38,7 +36,7 @@ from copy import copy | ||||
|  | ||||
| from devlib.utils.types import identifier, boolean, integer, numeric, caseless_string | ||||
|  | ||||
| from wa.utils.misc import isiterable, to_identifier | ||||
| from wa.utils.misc import isiterable | ||||
|  | ||||
|  | ||||
| def list_of_strs(value): | ||||
|   | ||||
| @@ -16,7 +16,7 @@ | ||||
| import os | ||||
|  | ||||
| from wa import ApkUiautoWorkload, Parameter | ||||
| from wa.utils.types import list_of_strs, numeric | ||||
| from wa.utils.types import list_of_strs | ||||
| from wa.framework.exception import ValidationError | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -13,14 +13,10 @@ | ||||
| # limitations under the License. | ||||
| # | ||||
| # pylint: disable=attribute-defined-outside-init | ||||
| import os | ||||
|  | ||||
| from wa import Workload, ApkUiautoWorkload, Parameter, ApkWorkload | ||||
| from wa import ApkFile, settings | ||||
| from wa import ApkUiautoWorkload, Parameter | ||||
| from wa.framework import pluginloader | ||||
| from wa.framework.exception import ConfigError, ResourceError | ||||
|  | ||||
| from devlib.utils.android import ApkInfo | ||||
|  | ||||
|  | ||||
| class Applaunch(ApkUiautoWorkload): | ||||
|   | ||||
| @@ -15,7 +15,6 @@ | ||||
| # limitations under the License. | ||||
| # | ||||
|  | ||||
| from collections import defaultdict | ||||
| import re | ||||
| import os | ||||
| import time | ||||
|   | ||||
| @@ -14,16 +14,13 @@ | ||||
| # | ||||
|  | ||||
| import os | ||||
| import logging | ||||
| import json | ||||
| import re | ||||
|  | ||||
| from HTMLParser import HTMLParser | ||||
| from collections import defaultdict, OrderedDict | ||||
| from distutils.version import StrictVersion | ||||
|  | ||||
| from wa import ApkUiautoWorkload, Parameter | ||||
| from wa.utils.types import list_of_strs, numeric | ||||
| from wa.utils.types import list_of_strs | ||||
| from wa.framework.exception import WorkloadError | ||||
|  | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user