kopia lustrzana https://github.com/Yakifo/amqtt
flake8: Fix all F401 unused imports warnings
rodzic
1b5ead2e08
commit
6435e4239c
|
@ -13,9 +13,7 @@
|
|||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import shlex
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
|
|
|
@ -7,7 +7,7 @@ import websockets
|
|||
import asyncio
|
||||
import sys
|
||||
import re
|
||||
from asyncio import Queue, CancelledError
|
||||
from asyncio import CancelledError
|
||||
from collections import deque
|
||||
|
||||
from functools import partial
|
||||
|
|
|
@ -14,7 +14,7 @@ from hbmqtt.mqtt.connect import *
|
|||
from hbmqtt.mqtt.protocol.client_handler import ClientProtocolHandler
|
||||
from hbmqtt.adapters import StreamReaderAdapter, StreamWriterAdapter, WebSocketsReader, WebSocketsWriter
|
||||
from hbmqtt.plugins.manager import PluginManager, BaseContext
|
||||
from hbmqtt.mqtt.protocol.handler import EVENT_MQTT_PACKET_SENT, EVENT_MQTT_PACKET_RECEIVED, ProtocolHandlerException
|
||||
from hbmqtt.mqtt.protocol.handler import ProtocolHandlerException
|
||||
from hbmqtt.mqtt.constants import *
|
||||
import websockets
|
||||
from websockets.uri import InvalidURI
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# See the file license.txt for copying permission.
|
||||
import asyncio
|
||||
from hbmqtt.mqtt.packet import CONNACK, MQTTPacket, MQTTFixedHeader, MQTTVariableHeader
|
||||
from hbmqtt.codecs import int_to_bytes, read_or_raise, bytes_to_int
|
||||
from hbmqtt.codecs import read_or_raise, bytes_to_int
|
||||
from hbmqtt.errors import HBMQTTException
|
||||
from hbmqtt.adapters import ReaderAdapter
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ import asyncio
|
|||
from asyncio import futures
|
||||
import sys
|
||||
from hbmqtt.mqtt.protocol.handler import ProtocolHandler, EVENT_MQTT_PACKET_RECEIVED
|
||||
from hbmqtt.mqtt.packet import *
|
||||
from hbmqtt.mqtt.disconnect import DisconnectPacket
|
||||
from hbmqtt.mqtt.pingreq import PingReqPacket
|
||||
from hbmqtt.mqtt.pingresp import PingRespPacket
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# See the file license.txt for copying permission.
|
||||
from hbmqtt.mqtt.packet import MQTTPacket, MQTTFixedHeader, SUBSCRIBE, PacketIdVariableHeader, MQTTPayload, MQTTVariableHeader
|
||||
from hbmqtt.errors import HBMQTTException, MQTTException
|
||||
from hbmqtt.errors import HBMQTTException
|
||||
from hbmqtt.codecs import *
|
||||
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
import unittest
|
||||
import logging
|
||||
import asyncio
|
||||
from hbmqtt.plugins.manager import PluginManager, BaseContext
|
||||
from hbmqtt.plugins.manager import PluginManager
|
||||
|
||||
formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s"
|
||||
logging.basicConfig(level=logging.INFO, format=formatter)
|
||||
|
|
|
@ -9,7 +9,6 @@ import asyncio
|
|||
import sqlite3
|
||||
from hbmqtt.plugins.manager import BaseContext
|
||||
from hbmqtt.plugins.persistence import SQLitePlugin
|
||||
from hbmqtt.session import Session
|
||||
|
||||
formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s"
|
||||
logging.basicConfig(level=logging.DEBUG, format=formatter)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# See the file license.txt for copying permission.
|
||||
import unittest
|
||||
from unittest.mock import patch, call, MagicMock
|
||||
from unittest.mock import patch, call
|
||||
from hbmqtt.broker import *
|
||||
from hbmqtt.mqtt.constants import *
|
||||
from hbmqtt.client import MQTTClient, ConnectException
|
||||
|
|
|
@ -8,7 +8,6 @@ import logging
|
|||
from hbmqtt.client import MQTTClient, ConnectException
|
||||
from hbmqtt.broker import Broker
|
||||
from hbmqtt.mqtt.constants import *
|
||||
from hbmqtt.errors import HBMQTTException
|
||||
|
||||
formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s"
|
||||
logging.basicConfig(level=logging.ERROR, format=formatter)
|
||||
|
|
1
tox.ini
1
tox.ini
|
@ -1,6 +1,5 @@
|
|||
[flake8]
|
||||
ignore =
|
||||
F401, # 'x' imported but unused (~12 warnings)
|
||||
F403, # 'from x import *' used; unable to detect undefined names (~29 warnings)
|
||||
F821, # undefined name 'x' (~1 warnings)
|
||||
F841, # local variable 'wildcard_pattern' is assigned to but never used (~17 warnings)
|
||||
|
|
Ładowanie…
Reference in New Issue