diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-20 10:37:17 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-20 10:37:17 +0100 |
commit | 003be2b93e6df699d45a73d83471c9299846eea1 (patch) | |
tree | 13dce1eb76e146d62c0f22208d2029c1a79c96e9 | |
parent | cdd1d99e2e61d0e27ef88cfcddb9d10791c045e3 (diff) | |
download | trollius-003be2b93e6df699d45a73d83471c9299846eea1.tar.gz |
asyncio: remove unused imports and unused variables noticed by pyflakes
-rw-r--r-- | asyncio/events.py | 3 | ||||
-rw-r--r-- | asyncio/futures.py | 1 | ||||
-rw-r--r-- | asyncio/selectors.py | 3 | ||||
-rw-r--r-- | asyncio/tasks.py | 2 | ||||
-rw-r--r-- | asyncio/test_utils.py | 2 | ||||
-rw-r--r-- | asyncio/unix_events.py | 1 | ||||
-rw-r--r-- | asyncio/windows_events.py | 1 |
7 files changed, 2 insertions, 11 deletions
diff --git a/asyncio/events.py b/asyncio/events.py index 5362f05..57af68a 100644 --- a/asyncio/events.py +++ b/asyncio/events.py @@ -9,12 +9,9 @@ __all__ = ['AbstractEventLoopPolicy', ] import subprocess -import sys import threading import socket -from .log import logger - class Handle: """Object returned by callback registration methods.""" diff --git a/asyncio/futures.py b/asyncio/futures.py index b9cd45c..91ea170 100644 --- a/asyncio/futures.py +++ b/asyncio/futures.py @@ -11,7 +11,6 @@ import sys import traceback from . import events -from .log import logger # States for Future. _PENDING = 'PENDING' diff --git a/asyncio/selectors.py b/asyncio/selectors.py index a5465e2..9be9225 100644 --- a/asyncio/selectors.py +++ b/asyncio/selectors.py @@ -5,9 +5,8 @@ This module allows high-level and efficient I/O multiplexing, built upon the """ -from abc import ABCMeta, abstractmethod, abstractproperty +from abc import ABCMeta, abstractmethod from collections import namedtuple, Mapping -import functools import math import select import sys diff --git a/asyncio/tasks.py b/asyncio/tasks.py index cf7b540..19fa654 100644 --- a/asyncio/tasks.py +++ b/asyncio/tasks.py @@ -7,7 +7,6 @@ __all__ = ['coroutine', 'Task', 'gather', 'shield', ] -import collections import concurrent.futures import functools import inspect @@ -486,7 +485,6 @@ def as_completed(fs, *, loop=None, timeout=None): if isinstance(fs, futures.Future) or iscoroutine(fs): raise TypeError("expect a list of futures, not %s" % type(fs).__name__) loop = loop if loop is not None else events.get_event_loop() - deadline = None if timeout is None else loop.time() + timeout todo = {async(f, loop=loop) for f in set(fs)} from .queues import Queue # Import here to avoid circular import problem. done = Queue(loop=loop) diff --git a/asyncio/test_utils.py b/asyncio/test_utils.py index 2a8a241..dd87789 100644 --- a/asyncio/test_utils.py +++ b/asyncio/test_utils.py @@ -15,7 +15,7 @@ import unittest import unittest.mock from http.server import HTTPServer -from wsgiref.simple_server import make_server, WSGIRequestHandler, WSGIServer +from wsgiref.simple_server import WSGIRequestHandler, WSGIServer try: import ssl diff --git a/asyncio/unix_events.py b/asyncio/unix_events.py index ce45e5f..2125548 100644 --- a/asyncio/unix_events.py +++ b/asyncio/unix_events.py @@ -15,7 +15,6 @@ from . import base_events from . import base_subprocess from . import constants from . import events -from . import protocols from . import selector_events from . import tasks from . import transports diff --git a/asyncio/windows_events.py b/asyncio/windows_events.py index e6be9d1..60fb589 100644 --- a/asyncio/windows_events.py +++ b/asyncio/windows_events.py @@ -5,7 +5,6 @@ import errno import math import socket import struct -import subprocess import weakref from . import events |