From 3f5e6d7a88fb97da8c0905b4b7102785489250ff Mon Sep 17 00:00:00 2001 From: Lawrence Lomax Date: Thu, 16 Jan 2020 03:55:59 -0800 Subject: [PATCH] Apply linters to idb py root Summary: Somethings to lint Reviewed By: zeyadsalloum Differential Revision: D19411755 fbshipit-source-id: db12a48862c25d1881fd924ae7dcf337723a47c0 --- idb/cli/commands/xctest.py | 2 +- idb/client/grpc.py | 2 +- idb/common/command.py | 8 ++++---- idb/common/tests/format_tests.py | 2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/idb/cli/commands/xctest.py b/idb/cli/commands/xctest.py index e493628c4..8d3ea0c1e 100644 --- a/idb/cli/commands/xctest.py +++ b/idb/cli/commands/xctest.py @@ -254,7 +254,7 @@ def get_tests_to_run(self, args: Namespace) -> Optional[Set[str]]: tests = tests[:-1] # the companion is expecting a set of size one for the logic tests, # that is why we parse it here - return set([tests]) + return {tests} return None diff --git a/idb/client/grpc.py b/idb/client/grpc.py index 7bdc9eaba..87eb3bd54 100644 --- a/idb/client/grpc.py +++ b/idb/client/grpc.py @@ -436,7 +436,7 @@ async def list_test_bundle(self, test_bundle_id: str, app_path: str) -> List[str response = await self.stub.xctest_list_tests( XctestListTestsRequest(bundle_name=test_bundle_id, app_path=app_path) ) - return [name for name in response.names] + return list(response.names) async def list_xctests(self) -> List[InstalledTestInfo]: response = await self.stub.xctest_list_bundles(XctestListBundlesRequest()) diff --git a/idb/common/command.py b/idb/common/command.py index dffc088db..d8cb3af88 100644 --- a/idb/common/command.py +++ b/idb/common/command.py @@ -1,13 +1,13 @@ #!/usr/bin/env python3 -# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. +# Copyright (c) Facebook, Inc. and its affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. from abc import ABCMeta, abstractmethod from argparse import ArgumentParser, Namespace -from logging import Logger, getLogger from typing import Dict, List, Optional -from idb.common import logging, plugin - class Command(metaclass=ABCMeta): @property diff --git a/idb/common/tests/format_tests.py b/idb/common/tests/format_tests.py index eec18eb75..9f26328d0 100644 --- a/idb/common/tests/format_tests.py +++ b/idb/common/tests/format_tests.py @@ -4,8 +4,6 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. -import json - from idb.common.format import ( installed_app_info_from_json, installed_test_info_from_json,