Skip to content

Commit

Permalink
make isort with new parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
asvetlov committed May 21, 2017
1 parent 5eb054f commit eee65a4
Show file tree
Hide file tree
Showing 54 changed files with 64 additions and 15 deletions.
1 change: 1 addition & 0 deletions aiohttp/abc.py
Expand Up @@ -3,6 +3,7 @@
from abc import ABC, abstractmethod
from collections.abc import Iterable, Sized


PY_35 = sys.version_info >= (3, 5)


Expand Down
1 change: 1 addition & 0 deletions aiohttp/backport_cookies.py
Expand Up @@ -40,6 +40,7 @@
import string # pragma: no cover
from http.cookies import CookieError, Morsel # pragma: no cover


__all__ = ["CookieError", "BaseCookie", "SimpleCookie"] # pragma: no cover

_nulljoin = ''.join # pragma: no cover
Expand Down
9 changes: 5 additions & 4 deletions aiohttp/client.py
Expand Up @@ -15,19 +15,20 @@
from . import connector as connector_mod
from . import client_exceptions, client_reqrep, hdrs, http, payload
from .client_exceptions import * # noqa
from .client_exceptions import (ClientError, ClientOSError,
ServerTimeoutError, WSServerHandshakeError)
from .client_exceptions import (ClientError, ClientOSError, ServerTimeoutError,
WSServerHandshakeError)
from .client_reqrep import * # noqa
from .client_reqrep import ClientRequest, ClientResponse
from .client_ws import ClientWebSocketResponse
from .connector import * # noqa
from .connector import TCPConnector
from .cookiejar import CookieJar
from .helpers import (PY_35, CeilTimeout, TimeoutHandle,
deprecated_noop, sentinel)
from .helpers import (PY_35, CeilTimeout, TimeoutHandle, deprecated_noop,
sentinel)
from .http import WS_KEY, WebSocketReader, WebSocketWriter
from .streams import FlowControlDataQueue


__all__ = (client_exceptions.__all__ + # noqa
client_reqrep.__all__ + # noqa
connector_mod.__all__ + # noqa
Expand Down
1 change: 1 addition & 0 deletions aiohttp/client_exceptions.py
Expand Up @@ -2,6 +2,7 @@

from asyncio import TimeoutError


__all__ = (
'ClientError',

Expand Down
1 change: 1 addition & 0 deletions aiohttp/client_reqrep.py
Expand Up @@ -20,6 +20,7 @@
from .log import client_logger
from .streams import FlowControlStreamReader


try:
import cchardet as chardet
except ImportError: # pragma: no cover
Expand Down
4 changes: 2 additions & 2 deletions aiohttp/client_ws.py
Expand Up @@ -5,8 +5,8 @@

from .client_exceptions import ClientError
from .helpers import PY_35, PY_352, Timeout, call_later, create_future
from .http import (WS_CLOSED_MESSAGE, WS_CLOSING_MESSAGE,
WebSocketError, WSMessage, WSMsgType)
from .http import (WS_CLOSED_MESSAGE, WS_CLOSING_MESSAGE, WebSocketError,
WSMessage, WSMsgType)


class ClientWebSocketResponse:
Expand Down
1 change: 1 addition & 0 deletions aiohttp/cookiejar.py
Expand Up @@ -6,6 +6,7 @@
from collections.abc import Mapping
from http.cookies import Morsel
from math import ceil

from yarl import URL

from .abc import AbstractCookieJar
Expand Down
1 change: 1 addition & 0 deletions aiohttp/formdata.py
Expand Up @@ -6,6 +6,7 @@
from . import hdrs, multipart, payload
from .helpers import guess_filename


__all__ = ('FormData',)


Expand Down
1 change: 1 addition & 0 deletions aiohttp/hdrs.py
@@ -1,6 +1,7 @@
"""HTTP Headers constants."""
from multidict import istr


METH_ANY = '*'
METH_CONNECT = 'CONNECT'
METH_HEAD = 'HEAD'
Expand Down
1 change: 1 addition & 0 deletions aiohttp/helpers.py
Expand Up @@ -24,6 +24,7 @@
from . import hdrs
from .abc import AbstractCookieJar


try:
from asyncio import ensure_future
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions aiohttp/http.py
Expand Up @@ -13,6 +13,7 @@
from .http_writer import (HttpVersion, HttpVersion10, HttpVersion11,
PayloadWriter, StreamWriter)


__all__ = (
'HttpProcessingError', 'RESPONSES', 'SERVER_SOFTWARE',

Expand Down
1 change: 1 addition & 0 deletions aiohttp/http_parser.py
Expand Up @@ -16,6 +16,7 @@
from .log import internal_logger
from .streams import EMPTY_PAYLOAD, FlowControlStreamReader


__all__ = (
'HttpParser', 'HttpRequestParser', 'HttpResponseParser',
'RawRequestMessage', 'RawResponseMessage')
Expand Down
1 change: 1 addition & 0 deletions aiohttp/http_websocket.py
Expand Up @@ -15,6 +15,7 @@
from .http_exceptions import HttpBadRequest, HttpProcessingError
from .log import ws_logger


__all__ = ('WS_CLOSED_MESSAGE', 'WS_CLOSING_MESSAGE', 'WS_KEY',
'WebSocketReader', 'WebSocketWriter', 'do_handshake',
'WSMessage', 'WebSocketError', 'WSMsgType', 'WSCloseCode')
Expand Down
1 change: 1 addition & 0 deletions aiohttp/http_writer.py
Expand Up @@ -11,6 +11,7 @@
from .abc import AbstractPayloadWriter
from .helpers import create_future, noop


__all__ = ('PayloadWriter', 'HttpVersion', 'HttpVersion10', 'HttpVersion11',
'StreamWriter')

Expand Down
1 change: 1 addition & 0 deletions aiohttp/log.py
@@ -1,5 +1,6 @@
import logging


access_logger = logging.getLogger('aiohttp.access')
client_logger = logging.getLogger('aiohttp.client')
internal_logger = logging.getLogger('aiohttp.internal')
Expand Down
1 change: 1 addition & 0 deletions aiohttp/multipart.py
Expand Up @@ -18,6 +18,7 @@
from .payload import (BytesPayload, LookupError, Payload, StringPayload,
get_payload, payload_type)


__all__ = ('MultipartReader', 'MultipartWriter', 'BodyPartReader',
'BadContentDispositionHeader', 'BadContentDispositionParam',
'parse_content_disposition', 'content_disposition_filename')
Expand Down
1 change: 1 addition & 0 deletions aiohttp/payload.py
Expand Up @@ -12,6 +12,7 @@
parse_mimetype, sentinel)
from .streams import DEFAULT_LIMIT, DataQueue, EofStream, StreamReader


__all__ = ('PAYLOAD_REGISTRY', 'get_payload', 'payload_type', 'Payload',
'BytesPayload', 'StringPayload', 'StreamReaderPayload',
'IOBasePayload', 'BytesIOPayload', 'BufferedReaderPayload',
Expand Down
1 change: 1 addition & 0 deletions aiohttp/payload_streamer.py
Expand Up @@ -25,6 +25,7 @@ def file_sender(writer, file_name=None):

from .payload import Payload, payload_type


__all__ = ('streamer',)


Expand Down
5 changes: 3 additions & 2 deletions aiohttp/pytest_plugin.py
Expand Up @@ -9,8 +9,9 @@
from aiohttp.web import Application

from .test_utils import unused_port as _unused_port
from .test_utils import (RawTestServer, TestClient, TestServer,
loop_context, setup_test_loop, teardown_test_loop)
from .test_utils import (RawTestServer, TestClient, TestServer, loop_context,
setup_test_loop, teardown_test_loop)


try:
import uvloop
Expand Down
1 change: 1 addition & 0 deletions aiohttp/resolver.py
Expand Up @@ -3,6 +3,7 @@

from .abc import AbstractResolver


__all__ = ('ThreadedResolver', 'AsyncResolver', 'DefaultResolver')

try:
Expand Down
1 change: 1 addition & 0 deletions aiohttp/streams.py
Expand Up @@ -5,6 +5,7 @@
from . import helpers
from .log import internal_logger


__all__ = (
'EMPTY_PAYLOAD', 'EofStream', 'StreamReader', 'DataQueue', 'ChunksQueue',
'FlowControlStreamReader',
Expand Down
1 change: 1 addition & 0 deletions aiohttp/web.py
Expand Up @@ -29,6 +29,7 @@
from .web_urldispatcher import PrefixedSubAppResource
from .web_ws import * # noqa


__all__ = (web_protocol.__all__ +
web_fileresponse.__all__ +
web_request.__all__ +
Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_exceptions.py
@@ -1,5 +1,6 @@
from .web_response import Response


__all__ = (
'HTTPException',
'HTTPError',
Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_fileresponse.py
Expand Up @@ -11,6 +11,7 @@
HTTPRequestRangeNotSatisfiable)
from .web_response import StreamResponse


__all__ = ('FileResponse',)


Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_middlewares.py
Expand Up @@ -4,6 +4,7 @@
from aiohttp.web_exceptions import HTTPMovedPermanently
from aiohttp.web_urldispatcher import SystemRoute


__all__ = (
'normalize_path_middleware',
)
Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_protocol.py
Expand Up @@ -18,6 +18,7 @@
from .web_request import BaseRequest
from .web_response import Response


__all__ = ('RequestHandler', 'RequestPayloadError')

ERROR = http.RawRequestMessage(
Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_request.py
Expand Up @@ -16,6 +16,7 @@
from .helpers import HeadersMixin, SimpleCookie, reify, sentinel
from .web_exceptions import HTTPRequestEntityTooLarge


__all__ = ('BaseRequest', 'FileField', 'Request')

FileField = collections.namedtuple(
Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_response.py
Expand Up @@ -13,6 +13,7 @@
from .helpers import HeadersMixin, SimpleCookie, sentinel
from .http import RESPONSES, SERVER_SOFTWARE, HttpVersion10, HttpVersion11


__all__ = ('ContentCoding', 'StreamResponse', 'Response', 'json_response')


Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_server.py
Expand Up @@ -5,6 +5,7 @@
from .web_protocol import RequestHandler
from .web_request import BaseRequest


__all__ = ('Server',)


Expand Down
1 change: 1 addition & 0 deletions aiohttp/web_urldispatcher.py
Expand Up @@ -23,6 +23,7 @@
from .web_fileresponse import FileResponse
from .web_response import Response, StreamResponse


__all__ = ('UrlDispatcher', 'UrlMappingMatchInfo',
'AbstractResource', 'Resource', 'PlainResource', 'DynamicResource',
'AbstractRoute', 'ResourceRoute',
Expand Down
5 changes: 3 additions & 2 deletions aiohttp/web_ws.py
Expand Up @@ -5,13 +5,14 @@
from . import hdrs
from .helpers import PY_35, PY_352, Timeout, call_later, create_future
from .http import (WS_CLOSED_MESSAGE, WS_CLOSING_MESSAGE, HttpProcessingError,
WebSocketError, WebSocketReader,
WSMessage, WSMsgType, do_handshake)
WebSocketError, WebSocketReader, WSMessage, WSMsgType,
do_handshake)
from .streams import FlowControlDataQueue
from .web_exceptions import (HTTPBadRequest, HTTPInternalServerError,
HTTPMethodNotAllowed)
from .web_response import StreamResponse


__all__ = ('WebSocketResponse', 'WebSocketReady', 'MsgType', 'WSMsgType',)

THRESHOLD_CONNLOST_ACCESS = 5
Expand Down
1 change: 1 addition & 0 deletions aiohttp/worker.py
Expand Up @@ -13,6 +13,7 @@

from .helpers import AccessLogger, create_future, ensure_future


__all__ = ('GunicornWebWorker',
'GunicornUVLoopWebWorker',
'GunicornTokioWebWorker')
Expand Down
1 change: 1 addition & 0 deletions demos/chat/aiohttpdemo_chat/views.py
Expand Up @@ -6,6 +6,7 @@
import aiohttp_jinja2
from aiohttp import web


log = logging.getLogger(__name__)


Expand Down
2 changes: 2 additions & 0 deletions demos/polls/aiohttpdemo_polls/__main__.py
@@ -1,4 +1,6 @@
import sys

from aiohttpdemo_polls.main import main


main(sys.argv[1:])
2 changes: 1 addition & 1 deletion demos/polls/aiohttpdemo_polls/db.py
@@ -1,6 +1,6 @@
import aiopg.sa
import sqlalchemy as sa

import aiopg.sa

__all__ = ['question', 'choice']

Expand Down
4 changes: 1 addition & 3 deletions demos/polls/aiohttpdemo_polls/main.py
Expand Up @@ -5,15 +5,13 @@

import jinja2

from trafaret_config import commandline


import aiohttp_jinja2
from aiohttp import web
from aiohttpdemo_polls.db import close_pg, init_pg
from aiohttpdemo_polls.middlewares import setup_middlewares
from aiohttpdemo_polls.routes import setup_routes
from aiohttpdemo_polls.utils import TRAFARET
from trafaret_config import commandline


def init(loop, argv):
Expand Down
1 change: 1 addition & 0 deletions demos/polls/aiohttpdemo_polls/routes.py
Expand Up @@ -2,6 +2,7 @@

from .views import index, poll, results, vote


PROJECT_ROOT = pathlib.Path(__file__).parent


Expand Down
1 change: 1 addition & 0 deletions demos/polls/aiohttpdemo_polls/utils.py
@@ -1,5 +1,6 @@
import trafaret as T


primitive_ip_regexp = r'^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'

TRAFARET = T.Dict({
Expand Down
1 change: 1 addition & 0 deletions demos/polls/tests/conftest.py
Expand Up @@ -5,6 +5,7 @@

from aiohttpdemo_polls.main import init


BASE_DIR = pathlib.Path(__file__).parent.parent


Expand Down
1 change: 1 addition & 0 deletions examples/client_ws.py
Expand Up @@ -7,6 +7,7 @@

import aiohttp


try:
import selectors
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions examples/legacy/srv.py
Expand Up @@ -10,6 +10,7 @@
import aiohttp
import aiohttp.server


try:
import ssl
except ImportError: # pragma: no cover
Expand Down
1 change: 1 addition & 0 deletions examples/legacy/tcp_protocol_parser.py
Expand Up @@ -6,6 +6,7 @@

import aiohttp


try:
import signal
except ImportError:
Expand Down
1 change: 1 addition & 0 deletions examples/static_files.py
Expand Up @@ -2,6 +2,7 @@

from aiohttp import web


app = web.Application()
app.router.add_static('/', pathlib.Path(__file__).parent, show_index=True)

Expand Down
1 change: 1 addition & 0 deletions examples/web_ws.py
Expand Up @@ -8,6 +8,7 @@
from aiohttp.web import (Application, Response, WebSocketResponse, WSMsgType,
run_app)


WS_FILE = os.path.join(os.path.dirname(__file__), 'websocket.html')


Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Expand Up @@ -4,6 +4,7 @@

import pytest


pytest_plugins = 'aiohttp.pytest_plugin'


Expand Down

0 comments on commit eee65a4

Please sign in to comment.