Skip to content

Commit

Permalink
Remove wildcard imports
Browse files Browse the repository at this point in the history
  • Loading branch information
thanosexcite committed Dec 28, 2018
1 parent 2a346da commit 5555504
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 26 deletions.
1 change: 1 addition & 0 deletions CHANGES/3468.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove wildcard imports
92 changes: 80 additions & 12 deletions aiohttp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,88 @@
# This relies on each of the submodules having an __all__ variable.

from . import hdrs # noqa
from .client import * # noqa
from .client import ClientSession, ServerFingerprintMismatch # noqa
from .cookiejar import * # noqa
from .formdata import * # noqa
from .helpers import * # noqa
from .client import BaseConnector # noqa
from .client import ClientConnectionError # noqa
from .client import ClientConnectorCertificateError # noqa
from .client import ClientConnectorError # noqa
from .client import ClientConnectorSSLError # noqa
from .client import ClientError # noqa
from .client import ClientHttpProxyError # noqa
from .client import ClientOSError # noqa
from .client import ClientPayloadError # noqa
from .client import ClientProxyConnectionError # noqa
from .client import ClientRequest # noqa
from .client import ClientResponse # noqa
from .client import ClientResponseError # noqa
from .client import ClientSSLError # noqa
from .client import ClientSession # noqa
from .client import ClientTimeout # noqa
from .client import ClientWebSocketResponse # noqa
from .client import ContentTypeError # noqa
from .client import Fingerprint # noqa
from .client import InvalidURL # noqa
from .client import RequestInfo # noqa
from .client import ServerConnectionError # noqa
from .client import ServerDisconnectedError # noqa
from .client import ServerFingerprintMismatch # noqa
from .client import ServerTimeoutError # noqa
from .client import TCPConnector # noqa
from .client import UnixConnector # noqa
from .client import WSServerHandshakeError # noqa
from .client import request # noqa
from .cookiejar import CookieJar # noqa
from .cookiejar import DummyCookieJar # noqa
from .formdata import FormData # noqa
from .helpers import BasicAuth # noqa
from .helpers import ChainMapProxy # noqa
from .http import (HttpVersion, HttpVersion10, HttpVersion11, # noqa
WSMsgType, WSCloseCode, WSMessage, WebSocketError) # noqa
from .multipart import * # noqa
from .payload import * # noqa
from .payload_streamer import * # noqa
from .resolver import * # noqa
from .signals import * # noqa
from .streams import * # noqa
from .tracing import * # noqa
from .multipart import BadContentDispositionHeader # noqa
from .multipart import BadContentDispositionParam # noqa
from .multipart import BodyPartReader # noqa
from .multipart import MultipartReader # noqa
from .multipart import MultipartWriter # noqa
from .multipart import content_disposition_filename # noqa
from .multipart import parse_content_disposition # noqa
from .payload import AsyncIterablePayload # noqa
from .payload import BufferedReaderPayload # noqa
from .payload import BytesIOPayload # noqa
from .payload import BytesPayload # noqa
from .payload import IOBasePayload # noqa
from .payload import JsonPayload # noqa
from .payload import PAYLOAD_REGISTRY # noqa
from .payload import Payload # noqa
from .payload import StringIOPayload # noqa
from .payload import StringPayload # noqa
from .payload import TextIOPayload # noqa
from .payload import get_payload # noqa
from .payload import payload_type # noqa
from .payload_streamer import streamer # noqa
from .resolver import AsyncResolver # noqa
from .resolver import DefaultResolver # noqa
from .resolver import ThreadedResolver # noqa
from .signals import Signal # noqa
from .streams import DataQueue # noqa
from .streams import EMPTY_PAYLOAD # noqa
from .streams import EofStream # noqa
from .streams import FlowControlDataQueue # noqa
from .streams import StreamReader # noqa
from .tracing import TraceConfig # noqa
from .tracing import TraceConnectionCreateEndParams # noqa
from .tracing import TraceConnectionCreateStartParams # noqa
from .tracing import TraceConnectionQueuedEndParams # noqa
from .tracing import TraceConnectionQueuedStartParams # noqa
from .tracing import TraceConnectionReuseconnParams # noqa
from .tracing import TraceDnsCacheHitParams # noqa
from .tracing import TraceDnsCacheMissParams # noqa
from .tracing import TraceDnsResolveHostEndParams # noqa
from .tracing import TraceDnsResolveHostStartParams # noqa
from .tracing import TraceRequestChunkSentParams # noqa
from .tracing import TraceRequestEndParams # noqa
from .tracing import TraceRequestExceptionParams # noqa
from .tracing import TraceRequestRedirectParams # noqa
from .tracing import TraceRequestStartParams # noqa
from .tracing import TraceResponseChunkReceivedParams # noqa

try:
from .worker import GunicornWebWorker, GunicornUVLoopWebWorker # noqa
Expand Down
18 changes: 15 additions & 3 deletions aiohttp/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,27 @@
from . import connector as connector_mod
from . import hdrs, http, payload
from .abc import AbstractCookieJar
from .client_exceptions import * # noqa
from .client_exceptions import ClientConnectionError # noqa
from .client_exceptions import ClientConnectorCertificateError # noqa
from .client_exceptions import ClientConnectorError # noqa
from .client_exceptions import ClientConnectorSSLError # noqa
from .client_exceptions import ClientHttpProxyError # noqa
from .client_exceptions import ClientPayloadError # noqa
from .client_exceptions import ClientProxyConnectionError # noqa
from .client_exceptions import ClientResponseError # noqa
from .client_exceptions import ClientSSLError # noqa
from .client_exceptions import ContentTypeError # noqa
from .client_exceptions import ServerConnectionError # noqa
from .client_exceptions import ServerDisconnectedError # noqa
from .client_exceptions import ServerFingerprintMismatch # noqa
from .client_exceptions import (ClientError, ClientOSError, InvalidURL,
ServerTimeoutError, TooManyRedirects,
WSServerHandshakeError)
from .client_reqrep import * # noqa
from .client_reqrep import RequestInfo # noqa
from .client_reqrep import (ClientRequest, ClientResponse, Fingerprint,
_merge_ssl_params)
from .client_ws import ClientWebSocketResponse
from .connector import * # noqa
from .connector import UnixConnector # noqa
from .connector import BaseConnector, TCPConnector
from .cookiejar import CookieJar
from .helpers import (PY_36, BasicAuth, CeilTimeout, TimeoutHandle,
Expand Down
107 changes: 96 additions & 11 deletions aiohttp/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,106 @@
from .abc import AbstractAccessLogger
from .helpers import all_tasks
from .log import access_logger
from .web_app import * # noqa
from .web_app import CleanupError # noqa
from .web_app import Application
from .web_exceptions import * # noqa
from .web_fileresponse import * # noqa
from .web_exceptions import HTTPAccepted # noqa
from .web_exceptions import HTTPBadGateway # noqa
from .web_exceptions import HTTPBadRequest # noqa
from .web_exceptions import HTTPClientError # noqa
from .web_exceptions import HTTPConflict # noqa
from .web_exceptions import HTTPCreated # noqa
from .web_exceptions import HTTPError # noqa
from .web_exceptions import HTTPException # noqa
from .web_exceptions import HTTPExpectationFailed # noqa
from .web_exceptions import HTTPFailedDependency # noqa
from .web_exceptions import HTTPForbidden # noqa
from .web_exceptions import HTTPFound # noqa
from .web_exceptions import HTTPGatewayTimeout # noqa
from .web_exceptions import HTTPGone # noqa
from .web_exceptions import HTTPInsufficientStorage # noqa
from .web_exceptions import HTTPInternalServerError # noqa
from .web_exceptions import HTTPLengthRequired # noqa
from .web_exceptions import HTTPMethodNotAllowed # noqa
from .web_exceptions import HTTPMisdirectedRequest # noqa
from .web_exceptions import HTTPMovedPermanently # noqa
from .web_exceptions import HTTPMultipleChoices # noqa
from .web_exceptions import HTTPNetworkAuthenticationRequired # noqa
from .web_exceptions import HTTPNoContent # noqa
from .web_exceptions import HTTPNonAuthoritativeInformation # noqa
from .web_exceptions import HTTPNotAcceptable # noqa
from .web_exceptions import HTTPNotExtended # noqa
from .web_exceptions import HTTPNotFound # noqa
from .web_exceptions import HTTPNotImplemented # noqa
from .web_exceptions import HTTPNotModified # noqa
from .web_exceptions import HTTPOk # noqa
from .web_exceptions import HTTPPartialContent # noqa
from .web_exceptions import HTTPPaymentRequired # noqa
from .web_exceptions import HTTPPermanentRedirect # noqa
from .web_exceptions import HTTPPreconditionFailed # noqa
from .web_exceptions import HTTPPreconditionRequired # noqa
from .web_exceptions import HTTPProxyAuthenticationRequired # noqa
from .web_exceptions import HTTPRedirection # noqa
from .web_exceptions import HTTPRequestEntityTooLarge # noqa
from .web_exceptions import HTTPRequestHeaderFieldsTooLarge # noqa
from .web_exceptions import HTTPRequestRangeNotSatisfiable # noqa
from .web_exceptions import HTTPRequestTimeout # noqa
from .web_exceptions import HTTPRequestURITooLong # noqa
from .web_exceptions import HTTPResetContent # noqa
from .web_exceptions import HTTPSeeOther # noqa
from .web_exceptions import HTTPServerError # noqa
from .web_exceptions import HTTPServiceUnavailable # noqa
from .web_exceptions import HTTPSuccessful # noqa
from .web_exceptions import HTTPTemporaryRedirect # noqa
from .web_exceptions import HTTPTooManyRequests # noqa
from .web_exceptions import HTTPUnauthorized # noqa
from .web_exceptions import HTTPUnavailableForLegalReasons # noqa
from .web_exceptions import HTTPUnprocessableEntity # noqa
from .web_exceptions import HTTPUnsupportedMediaType # noqa
from .web_exceptions import HTTPUpgradeRequired # noqa
from .web_exceptions import HTTPUseProxy # noqa
from .web_exceptions import HTTPVariantAlsoNegotiates # noqa
from .web_exceptions import HTTPVersionNotSupported # noqa
from .web_fileresponse import FileResponse # noqa
from .web_log import AccessLogger
from .web_middlewares import * # noqa
from .web_protocol import * # noqa
from .web_request import * # noqa
from .web_response import * # noqa
from .web_routedef import * # noqa
from .web_middlewares import middleware, normalize_path_middleware # noqa
from .web_protocol import PayloadAccessError # noqa
from .web_protocol import RequestHandler # noqa
from .web_protocol import RequestPayloadError # noqa
from .web_request import BaseRequest, FileField, Request # noqa
from .web_response import ContentCoding # noqa
from .web_response import Response # noqa
from .web_response import StreamResponse # noqa
from .web_response import json_response # noqa
from .web_routedef import AbstractRouteDef # noqa
from .web_routedef import RouteDef # noqa
from .web_routedef import RouteTableDef # noqa
from .web_routedef import StaticDef # noqa
from .web_routedef import delete # noqa
from .web_routedef import get # noqa
from .web_routedef import head # noqa
from .web_routedef import options # noqa
from .web_routedef import patch # noqa
from .web_routedef import post # noqa
from .web_routedef import put # noqa
from .web_routedef import route # noqa
from .web_routedef import static # noqa
from .web_routedef import view # noqa
from .web_runner import (AppRunner, BaseRunner, BaseSite, GracefulExit, # noqa
ServerRunner, SockSite, TCPSite, UnixSite)
from .web_server import * # noqa
from .web_urldispatcher import * # noqa
from .web_ws import * # noqa
from .web_server import Server # noqa
from .web_urldispatcher import AbstractResource # noqa
from .web_urldispatcher import AbstractRoute # noqa
from .web_urldispatcher import DynamicResource # noqa
from .web_urldispatcher import PlainResource # noqa
from .web_urldispatcher import Resource # noqa
from .web_urldispatcher import ResourceRoute # noqa
from .web_urldispatcher import StaticResource # noqa
from .web_urldispatcher import UrlDispatcher # noqa
from .web_urldispatcher import UrlMappingMatchInfo # noqa
from .web_urldispatcher import View # noqa
from .web_ws import WebSocketReady # noqa
from .web_ws import WebSocketResponse # noqa
from .web_ws import WSMsgType # noqa


__all__ = (web_protocol.__all__ +
Expand Down

0 comments on commit 5555504

Please sign in to comment.