flake8: Fix all F401 unused imports warnings

pull/8/head
Stein Magnus Jodal 2017-08-07 00:21:43 +02:00
rodzic 1b5ead2e08
commit 6435e4239c
11 zmienionych plików z 6 dodań i 12 usunięć

Wyświetl plik

@ -13,9 +13,7 @@
# All configuration values have a default; values that are commented out # All configuration values have a default; values that are commented out
# serve to show the default. # serve to show the default.
import sys
import os import os
import shlex
# If extensions (or modules to document with autodoc) are in another directory, # 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 # add these directories to sys.path here. If the directory is relative to the

Wyświetl plik

@ -7,7 +7,7 @@ import websockets
import asyncio import asyncio
import sys import sys
import re import re
from asyncio import Queue, CancelledError from asyncio import CancelledError
from collections import deque from collections import deque
from functools import partial from functools import partial

Wyświetl plik

@ -14,7 +14,7 @@ from hbmqtt.mqtt.connect import *
from hbmqtt.mqtt.protocol.client_handler import ClientProtocolHandler from hbmqtt.mqtt.protocol.client_handler import ClientProtocolHandler
from hbmqtt.adapters import StreamReaderAdapter, StreamWriterAdapter, WebSocketsReader, WebSocketsWriter from hbmqtt.adapters import StreamReaderAdapter, StreamWriterAdapter, WebSocketsReader, WebSocketsWriter
from hbmqtt.plugins.manager import PluginManager, BaseContext 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 * from hbmqtt.mqtt.constants import *
import websockets import websockets
from websockets.uri import InvalidURI from websockets.uri import InvalidURI

Wyświetl plik

@ -3,7 +3,7 @@
# See the file license.txt for copying permission. # See the file license.txt for copying permission.
import asyncio import asyncio
from hbmqtt.mqtt.packet import CONNACK, MQTTPacket, MQTTFixedHeader, MQTTVariableHeader 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.errors import HBMQTTException
from hbmqtt.adapters import ReaderAdapter from hbmqtt.adapters import ReaderAdapter

Wyświetl plik

@ -5,7 +5,6 @@ import asyncio
from asyncio import futures from asyncio import futures
import sys import sys
from hbmqtt.mqtt.protocol.handler import ProtocolHandler, EVENT_MQTT_PACKET_RECEIVED 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.disconnect import DisconnectPacket
from hbmqtt.mqtt.pingreq import PingReqPacket from hbmqtt.mqtt.pingreq import PingReqPacket
from hbmqtt.mqtt.pingresp import PingRespPacket from hbmqtt.mqtt.pingresp import PingRespPacket

Wyświetl plik

@ -2,7 +2,7 @@
# #
# See the file license.txt for copying permission. # See the file license.txt for copying permission.
from hbmqtt.mqtt.packet import MQTTPacket, MQTTFixedHeader, SUBSCRIBE, PacketIdVariableHeader, MQTTPayload, MQTTVariableHeader 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 * from hbmqtt.codecs import *

Wyświetl plik

@ -4,7 +4,7 @@
import unittest import unittest
import logging import logging
import asyncio 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" formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s"
logging.basicConfig(level=logging.INFO, format=formatter) logging.basicConfig(level=logging.INFO, format=formatter)

Wyświetl plik

@ -9,7 +9,6 @@ import asyncio
import sqlite3 import sqlite3
from hbmqtt.plugins.manager import BaseContext from hbmqtt.plugins.manager import BaseContext
from hbmqtt.plugins.persistence import SQLitePlugin from hbmqtt.plugins.persistence import SQLitePlugin
from hbmqtt.session import Session
formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s" formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s"
logging.basicConfig(level=logging.DEBUG, format=formatter) logging.basicConfig(level=logging.DEBUG, format=formatter)

Wyświetl plik

@ -2,7 +2,7 @@
# #
# See the file license.txt for copying permission. # See the file license.txt for copying permission.
import unittest import unittest
from unittest.mock import patch, call, MagicMock from unittest.mock import patch, call
from hbmqtt.broker import * from hbmqtt.broker import *
from hbmqtt.mqtt.constants import * from hbmqtt.mqtt.constants import *
from hbmqtt.client import MQTTClient, ConnectException from hbmqtt.client import MQTTClient, ConnectException

Wyświetl plik

@ -8,7 +8,6 @@ import logging
from hbmqtt.client import MQTTClient, ConnectException from hbmqtt.client import MQTTClient, ConnectException
from hbmqtt.broker import Broker from hbmqtt.broker import Broker
from hbmqtt.mqtt.constants import * from hbmqtt.mqtt.constants import *
from hbmqtt.errors import HBMQTTException
formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s" formatter = "[%(asctime)s] %(name)s {%(filename)s:%(lineno)d} %(levelname)s - %(message)s"
logging.basicConfig(level=logging.ERROR, format=formatter) logging.basicConfig(level=logging.ERROR, format=formatter)

Wyświetl plik

@ -1,6 +1,5 @@
[flake8] [flake8]
ignore = ignore =
F401, # 'x' imported but unused (~12 warnings)
F403, # 'from x import *' used; unable to detect undefined names (~29 warnings) F403, # 'from x import *' used; unable to detect undefined names (~29 warnings)
F821, # undefined name 'x' (~1 warnings) F821, # undefined name 'x' (~1 warnings)
F841, # local variable 'wildcard_pattern' is assigned to but never used (~17 warnings) F841, # local variable 'wildcard_pattern' is assigned to but never used (~17 warnings)