# Path: starlette/types.py

# 
# Path: starlette/websockets.py
# class WebSocketDisconnect(Exception):
#     def __init__(self, code: int = 1000, reason: str = None) -> None:
#         self.code = code
#         self.reason = reason or ""


import asyncio
import contextlib
import http
import inspect
import io
import json
import math
import queue
import sys
import types
import typing
import anyio.abc
import requests
from concurrent.futures import Future
from urllib.parse import unquote, urljoin, urlsplit
from anyio.streams.stapled import StapledObjectStream
from starlette.types import Message, Receive, Scope, Send
from starlette.websockets import WebSocketDisconnect
    from typing import TypedDict
    from typing_extensions import TypedDict



if sys.version_info >= (3, 8):  # pragma: no cover
else:  # pragma: no cover


_PortalFactoryType = typing.Callable[
    [], typing.ContextManager[anyio.abc.BlockingPortal]
]


# Annotations for `Session.request()`
Cookies = typing.Union[
    typing.MutableMapping[str, str], requests.cookies.RequestsCookieJar
]
Params = typing.Union[bytes, typing.MutableMapping[str, str]]
DataType = typing.Union[bytes, typing.MutableMapping[str, str], typing.IO]
TimeOut = typing.Union[float, typing.Tuple[float, float]]
FileType = typing.MutableMapping[str, typing.IO]
AuthType = typing.Union[
    typing.Tuple[str, str],
    requests.auth.AuthBase,
    typing.Callable[[requests.PreparedRequest], requests.PreparedRequest],
]



# Path: starlette/types.py

# 
# Path: starlette/websockets.py
# class WebSocketDisconnect(Exception):
#     def __init__(self, code: int = 1000, reason: str = None) -> None:
#         self.code = code
#         self.reason = reason or ""


# Path: starlette/testclient.py
import asyncio
import contextlib
import http
import inspect
import io
import json
import math
import queue
import sys
import types
import typing
import anyio.abc
import requests
from concurrent.futures import Future
from urllib.parse import unquote, urljoin, urlsplit
from anyio.streams.stapled import StapledObjectStream
from starlette.types import Message, Receive, Scope, Send
from starlette.websockets import WebSocketDisconnect
    from typing import TypedDict
    from typing_extensions import TypedDict




if sys.version_info >= (3, 8):  # pragma: no cover
else:  # pragma: no cover


_PortalFactoryType = typing.Callable[
    [], typing.ContextManager[anyio.abc.BlockingPortal]
]


# Annotations for `Session.request()`
Cookies = typing.Union[
    typing.MutableMapping[str, str], requests.cookies.RequestsCookieJar
]
Params = typing.Union[bytes, typing.MutableMapping[str, str]]
DataType = typing.Union[bytes, typing.MutableMapping[str, str], typing.IO]
TimeOut = typing.Union[float, typing.Tuple[float, float]]
FileType = typing.MutableMapping[str, typing.IO]
AuthType = typing.Union[
    typing.Tuple[str, str],
    requests.auth.AuthBase,
    typing.Callable[[requests.PreparedRequest], requests.PreparedRequest],
]



ASGIInstance = typing.Callable[[Receive, Send], typing.Awaitable[None]]