Skip to content

Commit

Permalink
Fix __all__
Browse files Browse the repository at this point in the history
  • Loading branch information
1st1 committed Dec 10, 2017
1 parent 1584502 commit daaeaef
Show file tree
Hide file tree
Showing 18 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion Lib/asyncio/base_events.py
Expand Up @@ -36,7 +36,7 @@
from .log import logger


__all__ = ['BaseEventLoop']
__all__ = 'BaseEventLoop',


# Minimum number of _scheduled timer handles before cleanup of
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/base_futures.py
@@ -1,4 +1,4 @@
__all__ = []
__all__ = ()

import concurrent.futures._base
import reprlib
Expand Down
2 changes: 0 additions & 2 deletions Lib/asyncio/constants.py
@@ -1,5 +1,3 @@
"""Constants."""

# After the connection is lost, log warnings after this many write()s.
LOG_THRESHOLD_FOR_CONNLOST_WRITES = 5

Expand Down
3 changes: 1 addition & 2 deletions Lib/asyncio/coroutines.py
@@ -1,5 +1,4 @@
__all__ = ['coroutine',
'iscoroutinefunction', 'iscoroutine']
__all__ = 'coroutine', 'iscoroutinefunction', 'iscoroutine'

import functools
import inspect
Expand Down
17 changes: 9 additions & 8 deletions Lib/asyncio/events.py
@@ -1,13 +1,14 @@
"""Event loop and event loop policy."""

__all__ = ['AbstractEventLoopPolicy',
'AbstractEventLoop', 'AbstractServer',
'Handle', 'TimerHandle',
'get_event_loop_policy', 'set_event_loop_policy',
'get_event_loop', 'set_event_loop', 'new_event_loop',
'get_child_watcher', 'set_child_watcher',
'_set_running_loop', '_get_running_loop',
]
__all__ = (
'AbstractEventLoopPolicy',
'AbstractEventLoop', 'AbstractServer',
'Handle', 'TimerHandle',
'get_event_loop_policy', 'set_event_loop_policy',
'get_event_loop', 'set_event_loop', 'new_event_loop',
'get_child_watcher', 'set_child_watcher',
'_set_running_loop', '_get_running_loop',
)

import functools
import inspect
Expand Down
6 changes: 4 additions & 2 deletions Lib/asyncio/futures.py
@@ -1,7 +1,9 @@
"""A Future class similar to the one in PEP 3148."""

__all__ = ['CancelledError', 'TimeoutError', 'InvalidStateError',
'Future', 'wrap_future', 'isfuture']
__all__ = (
'CancelledError', 'TimeoutError', 'InvalidStateError',
'Future', 'wrap_future', 'isfuture',
)

import concurrent.futures
import logging
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/locks.py
@@ -1,6 +1,6 @@
"""Synchronization primitives."""

__all__ = ['Lock', 'Event', 'Condition', 'Semaphore', 'BoundedSemaphore']
__all__ = ('Lock', 'Event', 'Condition', 'Semaphore', 'BoundedSemaphore')

import collections
import warnings
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/proactor_events.py
Expand Up @@ -4,7 +4,7 @@
proactor is only implemented on Windows with IOCP.
"""

__all__ = ['BaseProactorEventLoop']
__all__ = 'BaseProactorEventLoop',

import socket
import warnings
Expand Down
6 changes: 4 additions & 2 deletions Lib/asyncio/protocols.py
@@ -1,7 +1,9 @@
"""Abstract Protocol base classes."""

__all__ = ['BaseProtocol', 'Protocol', 'DatagramProtocol',
'SubprocessProtocol']
__all__ = (
'BaseProtocol', 'Protocol', 'DatagramProtocol',
'SubprocessProtocol',
)


class BaseProtocol:
Expand Down
10 changes: 3 additions & 7 deletions Lib/asyncio/queues.py
@@ -1,4 +1,4 @@
__all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'QueueFull', 'QueueEmpty']
__all__ = ('Queue', 'PriorityQueue', 'LifoQueue', 'QueueFull', 'QueueEmpty')

import collections
import heapq
Expand All @@ -8,16 +8,12 @@


class QueueEmpty(Exception):
"""Exception raised when Queue.get_nowait() is called on a Queue object
which is empty.
"""
"""Raised when Queue.get_nowait() is called on an empty Queue."""
pass


class QueueFull(Exception):
"""Exception raised when the Queue.put_nowait() method is called on a Queue
object which is full.
"""
"""Raised when the Queue.put_nowait() method is called on a full Queue."""
pass


Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/selector_events.py
Expand Up @@ -4,7 +4,7 @@
also includes support for signal handling, see the unix_events sub-module.
"""

__all__ = ['BaseSelectorEventLoop']
__all__ = 'BaseSelectorEventLoop',

import collections
import errno
Expand Down
14 changes: 6 additions & 8 deletions Lib/asyncio/streams.py
@@ -1,15 +1,13 @@
"""Stream-related things."""

__all__ = ['StreamReader', 'StreamWriter', 'StreamReaderProtocol',
'open_connection', 'start_server',
'IncompleteReadError',
'LimitOverrunError',
]
__all__ = (
'StreamReader', 'StreamWriter', 'StreamReaderProtocol',
'open_connection', 'start_server',
'IncompleteReadError', 'LimitOverrunError',
)

import socket

if hasattr(socket, 'AF_UNIX'):
__all__.extend(['open_unix_connection', 'start_unix_server'])
__all__ += ('open_unix_connection', 'start_unix_server')

from . import coroutines
from . import events
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/subprocess.py
@@ -1,4 +1,4 @@
__all__ = ['create_subprocess_exec', 'create_subprocess_shell']
__all__ = 'create_subprocess_exec', 'create_subprocess_shell'

import subprocess

Expand Down
11 changes: 6 additions & 5 deletions Lib/asyncio/tasks.py
@@ -1,10 +1,11 @@
"""Support for tasks, coroutines and the scheduler."""

__all__ = ['Task',
'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED',
'wait', 'wait_for', 'as_completed', 'sleep', 'async',
'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe',
]
__all__ = (
'Task',
'FIRST_COMPLETED', 'FIRST_EXCEPTION', 'ALL_COMPLETED',
'wait', 'wait_for', 'as_completed', 'sleep', 'async',
'gather', 'shield', 'ensure_future', 'run_coroutine_threadsafe',
)

import concurrent.futures
import functools
Expand Down
7 changes: 4 additions & 3 deletions Lib/asyncio/transports.py
@@ -1,8 +1,9 @@
"""Abstract Transport class."""

__all__ = ['BaseTransport', 'ReadTransport', 'WriteTransport',
'Transport', 'DatagramTransport', 'SubprocessTransport',
]
__all__ = (
'BaseTransport', 'ReadTransport', 'WriteTransport',
'Transport', 'DatagramTransport', 'SubprocessTransport',
)


class BaseTransport:
Expand Down
10 changes: 6 additions & 4 deletions Lib/asyncio/unix_events.py
Expand Up @@ -23,10 +23,12 @@
from .log import logger


__all__ = ['SelectorEventLoop',
'AbstractChildWatcher', 'SafeChildWatcher',
'FastChildWatcher', 'DefaultEventLoopPolicy',
]
__all__ = (
'SelectorEventLoop',
'AbstractChildWatcher', 'SafeChildWatcher',
'FastChildWatcher', 'DefaultEventLoopPolicy',
)


if sys.platform == 'win32': # pragma: no cover
raise ImportError('Signals are not really supported on Windows')
Expand Down
7 changes: 4 additions & 3 deletions Lib/asyncio/windows_events.py
Expand Up @@ -18,9 +18,10 @@
from .log import logger


__all__ = ['SelectorEventLoop', 'ProactorEventLoop', 'IocpProactor',
'DefaultEventLoopPolicy',
]
__all__ = (
'SelectorEventLoop', 'ProactorEventLoop', 'IocpProactor',
'DefaultEventLoopPolicy',
)


NULL = 0
Expand Down
2 changes: 1 addition & 1 deletion Lib/asyncio/windows_utils.py
Expand Up @@ -14,7 +14,7 @@
import warnings


__all__ = ['pipe', 'Popen', 'PIPE', 'PipeHandle']
__all__ = 'pipe', 'Popen', 'PIPE', 'PipeHandle'


# Constants/globals
Expand Down

0 comments on commit daaeaef

Please sign in to comment.