Skip to content

Commit

Permalink
Remove unused python imports (#9136)
Browse files Browse the repository at this point in the history
Signed-off-by: Victor Morales <[email protected]>
  • Loading branch information
electrocucaracha authored and pull[bot] committed Sep 16, 2021
1 parent fd8d8e0 commit 1074249
Show file tree
Hide file tree
Showing 21 changed files with 6 additions and 46 deletions.
1 change: 0 additions & 1 deletion config/esp32/components/chip/create_args_gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import json
import os
import argparse
import re

# Parse the build's compile_commands.json to generate
# final args file for CHIP build.
Expand Down
4 changes: 0 additions & 4 deletions scripts/build/build/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import os

from typing import Set

from builders.builder import Builder

from builders.android import AndroidBoard, AndroidBuilder
from builders.efr32 import Efr32Builder, Efr32App, Efr32Board
from builders.esp32 import Esp32Builder, Esp32Board, Esp32App
Expand Down
4 changes: 0 additions & 4 deletions scripts/build/build/targets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os
import shutil

from enum import IntEnum, auto


Expand Down
1 change: 0 additions & 1 deletion scripts/build/builders/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os
import shlex

Expand Down
1 change: 0 additions & 1 deletion scripts/build/builders/efr32.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os
from enum import Enum, auto

Expand Down
1 change: 0 additions & 1 deletion scripts/build/builders/gn.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os

from .builder import Builder
Expand Down
1 change: 0 additions & 1 deletion scripts/build/builders/host.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os
from platform import uname, release
from enum import Enum, auto
Expand Down
1 change: 0 additions & 1 deletion scripts/build/builders/qpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os

from .gn import GnBuilder
Expand Down
1 change: 0 additions & 1 deletion scripts/flashing/nrfconnect_firmware_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
Do not reset device after flashing
"""

import errno
import os
import sys

Expand Down
2 changes: 1 addition & 1 deletion scripts/tools/memory/report_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
import memdf.report
import memdf.select

from memdf import Config, DFs, SectionDF, SymbolDF
from memdf import Config, DFs, SymbolDF


def main(argv):
Expand Down
3 changes: 0 additions & 3 deletions scripts/tools/zap/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,9 @@
#

import argparse
import json
import os
from pathlib import Path
import subprocess
import sys
import urllib.request

CHIP_ROOT_DIR = os.path.realpath(
os.path.join(os.path.dirname(__file__), '../../..'))
Expand Down
2 changes: 0 additions & 2 deletions src/controller/python/chip-device-ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,8 @@
import textwrap
import time
import string
import re
import traceback
from cmd import Cmd
from chip.ChipBleUtility import FAKE_CONN_OBJ_VALUE
from chip.setup_payload import SetupPayload

# Extend sys.path with one or more directories, relative to the location of the
Expand Down
15 changes: 0 additions & 15 deletions src/controller/python/chip/ChipBluezMgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
import dbus
import dbus.service
import dbus.mainloop.glib
import gc
import logging
import pprint
import sys
import threading
import time
Expand All @@ -45,22 +43,9 @@
logging.exception("Unable to find GObject from gi.repository")
from pgi.repository import GObject

from .ChipUtility import ChipUtility

from .ChipBleUtility import (
BLE_SUBSCRIBE_OPERATION_SUBSCRIBE,
BLE_SUBSCRIBE_OPERATION_UNSUBSCRIBE,
BLE_ERROR_REMOTE_DEVICE_DISCONNECTED,
VoidPtrToUUIDString,
BleTxEvent,
BleDisconnectEvent,
BleRxEvent,
BleSubscribeEvent,
BleTxEventStruct,
BleDisconnectEventStruct,
BleRxEventStruct,
BleSubscribeEventStruct,
BleDeviceIdentificationInfo,
ParseServiceData,
)

Expand Down
2 changes: 0 additions & 2 deletions src/controller/python/chip/ChipCommissionableNodeCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@

from __future__ import absolute_import
from __future__ import print_function
import time
from threading import Thread
from ctypes import *
from .ChipStack import *
from .exceptions import *
Expand Down
1 change: 0 additions & 1 deletion src/controller/python/chip/ChipCoreBluetoothMgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
BleDisconnectEventStruct,
BleRxEventStruct,
BleSubscribeEventStruct,
BleDeviceIdentificationInfo,
ParseServiceData,
)

Expand Down
2 changes: 0 additions & 2 deletions src/controller/python/chip/ChipDeviceCtrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

from __future__ import absolute_import
from __future__ import print_function
import time
from threading import Thread
from ctypes import *
from .ChipStack import *
from .clusters.CHIPClusters import *
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/discovery/library_handle.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import chip.native
import ctypes
from ctypes import c_void_p, c_int32, c_uint32, c_uint64
from ctypes import c_uint32, c_uint64
from chip.discovery.types import DiscoverSuccessCallback_t, DiscoverFailureCallback_t


Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/interaction_model/delegate.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
'''

from construct import Struct, Int64ul, Int32ul, Int16ul, Int8ul
from ctypes import CFUNCTYPE, c_void_p, c_size_t, c_uint32, c_uint64, c_uint8, c_uint16, c_ssize_t
from ctypes import CFUNCTYPE, c_void_p, c_uint32, c_uint64, c_uint8, c_uint16, c_ssize_t
import ctypes
import chip.native
import threading
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/internal/commissioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
from chip.configuration import GetLocalNodeId
from chip.native import NativeLibraryHandleMethodArguments, GetLibraryHandle
from ctypes import c_uint64, c_uint32, c_uint16, c_char_p
from ctypes import c_uint64, c_uint32, c_uint16
from enum import Enum
from typing import Optional
from chip.internal.types import NetworkCredentialsRequested, OperationalCredentialsRequested, PairingComplete
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/internal/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Generally thread credentials are assumed to be binary objects, however for
# testing purposes, we expose the internal structure here.

from construct import BitStruct, Byte, Bytes, Enum, Flag, Int16ul, Int32ul, Int64ul, PaddedString, Padding, Struct
from construct import Byte, Bytes, Int16ul, Int64ul, PaddedString, Struct

ThreadNetworkInfo = Struct(
"ActiveTimestamp" / Int64ul,
Expand Down
2 changes: 1 addition & 1 deletion src/controller/python/chip/logging/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.
#

from ctypes import CFUNCTYPE, py_object, c_char_p, c_uint8
from ctypes import CFUNCTYPE, c_char_p, c_uint8

# Log callback: void(category, module, message)
LogRedirectCallback_t = CFUNCTYPE(None, c_uint8, c_char_p, c_char_p)

0 comments on commit 1074249

Please sign in to comment.