prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Type-checking our tests
  I know this is not a standard thing to do across Encode projects, but I've been wondering if it would be worth starting to type-hint our tests.
  
  I've seen at least two instances of this recently:
  
  - In HTTPX: https://github.com/encode/httpx/pull/648#discussion_r359862603
  - In Starlette: https://github.com/encode/starlette/issues/722
  
  My rationale is based on two aspects:
  
  - It improves our upfront knowledge about how users will actually use HTTPX — currently their usage of type hints in the wild is not reflected anywhere.
  - It helps us catch type hint inconsistencies we wouldn't see in the core package.
  
  The main counter-argument, I suppose, is that type hinting tests is tedious. I think that's fair, but I believe the two pro's above make it compelling.
  
  Thoughts?
  
  </issue>
  <code>
  [start of httpx/_types.py]
  1 """
  2 Type definitions for type checking purposes.
  3 """
  4 
  5 import ssl
  6 from http.cookiejar import CookieJar
  7 from typing import (
  8     IO,
  9     TYPE_CHECKING,
  10     AsyncIterator,
  11     Callable,
  12     Dict,
  13     Iterator,
  14     List,
  15     Mapping,
  16     Optional,
  17     Sequence,
  18     Tuple,
  19     Union,
  20 )
  21 
  22 if TYPE_CHECKING:  # pragma: no cover
  23     from ._auth import Auth  # noqa: F401
  24     from ._config import Proxy, Timeout  # noqa: F401
  25     from ._models import URL, Cookies, Headers, QueryParams, Request  # noqa: F401
  26 
  27 
  28 PrimitiveData = Optional[Union[str, int, float, bool]]
  29 
  30 URLTypes = Union["URL", str]
  31 
  32 QueryParamTypes = Union[
  33     "QueryParams",
  34     Mapping[str, Union[PrimitiveData, Sequence[PrimitiveData]]],
  35     List[Tuple[str, PrimitiveData]],
  36     str,
  37 ]
  38 
  39 HeaderTypes = Union[
  40     "Headers",
  41     Dict[str, str],
  42     Dict[bytes, bytes],
  43     Sequence[Tuple[str, str]],
  44     Sequence[Tuple[bytes, bytes]],
  45 ]
  46 
  47 CookieTypes = Union["Cookies", CookieJar, Dict[str, str]]
  48 
  49 CertTypes = Union[str, Tuple[str, str], Tuple[str, str, str]]
  50 VerifyTypes = Union[str, bool, ssl.SSLContext]
  51 TimeoutTypes = Union[
  52     Optional[float],
  53     Tuple[Optional[float], Optional[float], Optional[float], Optional[float]],
  54     "Timeout",
  55 ]
  56 ProxiesTypes = Union[URLTypes, "Proxy", Dict[URLTypes, Union[URLTypes, "Proxy"]]]
  57 
  58 AuthTypes = Union[
  59     Tuple[Union[str, bytes], Union[str, bytes]],
  60     Callable[["Request"], "Request"],
  61     "Auth",
  62 ]
  63 
  64 RequestData = Union[dict, str, bytes, Iterator[bytes], AsyncIterator[bytes]]
  65 
  66 FileContent = Union[IO[str], IO[bytes], str, bytes]
  67 FileTypes = Union[
  68     # file (or text)
  69     FileContent,
  70     # (filename, file (or text))
  71     Tuple[Optional[str], FileContent],
  72     # (filename, file (or text), content_type)
  73     Tuple[Optional[str], FileContent, Optional[str]],
  74 ]
  75 RequestFiles = Union[Mapping[str, FileTypes], List[Tuple[str, FileTypes]]]
  76
  [end of httpx/_types.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/httpx/_types.py b/httpx/_types.py
  --- a/httpx/_types.py
  +++ b/httpx/_types.py
  @@ -72,4 +72,4 @@
       # (filename, file (or text), content_type)
       Tuple[Optional[str], FileContent, Optional[str]],
   ]
  -RequestFiles = Union[Mapping[str, FileTypes], List[Tuple[str, FileTypes]]]
  +RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]]
  
verification_info: {"golden_diff": "diff --git a/httpx/_types.py b/httpx/_types.py\n--- a/httpx/_types.py\n+++ b/httpx/_types.py\n@@ -72,4 +72,4 @@\n     # (filename, file (or text), content_type)\n     Tuple[Optional[str], FileContent, Optional[str]],\n ]\n-RequestFiles = Union[Mapping[str, FileTypes], List[Tuple[str, FileTypes]]]\n+RequestFiles = Union[Mapping[str, FileTypes], Sequence[Tuple[str, FileTypes]]]\n", "issue": "Type-checking our tests\nI know this is not a standard thing to do across Encode projects, but I've been wondering if it would be worth starting to type-hint our tests.\r\n\r\nI've seen at least two instances of this recently:\r\n\r\n- In HTTPX: https://github.com/encode/httpx/pull/648#discussion_r359862603\r\n- In Starlette: https://github.com/encode/starlette/issues/722\r\n\r\nMy rationale is based on two aspects:\r\n\r\n- It improves our upfront knowledge about how users will actually use HTTPX \u2014 currently their usage of type hints in the wild is not reflected anywhere.\r\n- It helps us catch type hint inconsistencies we wouldn't see in the core package.\r\n\r\nThe main counter-argument, I suppose, is that type hinting tests is tedious. I think that's fair, but I believe the two pro's above make it compelling.\r\n\r\nThoughts?\n", "before_files": [{"content": "\"\"\"\nType definitions for type checking purposes.\n\"\"\"\n\nimport ssl\nfrom http.cookiejar import CookieJar\nfrom typing import (\n    IO,\n    TYPE_CHECKING,\n    AsyncIterator,\n    Callable,\n    Dict,\n    Iterator,\n    List,\n    Mapping,\n    Optional,\n    Sequence,\n    Tuple,\n    Union,\n)\n\nif TYPE_CHECKING:  # pragma: no cover\n    from ._auth import Auth  # noqa: F401\n    from ._config import Proxy, Timeout  # noqa: F401\n    from ._models import URL, Cookies, Headers, QueryParams, Request  # noqa: F401\n\n\nPrimitiveData = Optional[Union[str, int, float, bool]]\n\nURLTypes = Union[\"URL\", str]\n\nQueryParamTypes = Union[\n    \"QueryParams\",\n    Mapping[str, Union[PrimitiveData, Sequence[PrimitiveData]]],\n    List[Tuple[str, PrimitiveData]],\n    str,\n]\n\nHeaderTypes = Union[\n    \"Headers\",\n    Dict[str, str],\n    Dict[bytes, bytes],\n    Sequence[Tuple[str, str]],\n    Sequence[Tuple[bytes, bytes]],\n]\n\nCookieTypes = Union[\"Cookies\", CookieJar, Dict[str, str]]\n\nCertTypes = Union[str, Tuple[str, str], Tuple[str, str, str]]\nVerifyTypes = Union[str, bool, ssl.SSLContext]\nTimeoutTypes = Union[\n    Optional[float],\n    Tuple[Optional[float], Optional[float], Optional[float], Optional[float]],\n    \"Timeout\",\n]\nProxiesTypes = Union[URLTypes, \"Proxy\", Dict[URLTypes, Union[URLTypes, \"Proxy\"]]]\n\nAuthTypes = Union[\n    Tuple[Union[str, bytes], Union[str, bytes]],\n    Callable[[\"Request\"], \"Request\"],\n    \"Auth\",\n]\n\nRequestData = Union[dict, str, bytes, Iterator[bytes], AsyncIterator[bytes]]\n\nFileContent = Union[IO[str], IO[bytes], str, bytes]\nFileTypes = Union[\n    # file (or text)\n    FileContent,\n    # (filename, file (or text))\n    Tuple[Optional[str], FileContent],\n    # (filename, file (or text), content_type)\n    Tuple[Optional[str], FileContent, Optional[str]],\n]\nRequestFiles = Union[Mapping[str, FileTypes], List[Tuple[str, FileTypes]]]\n", "path": "httpx/_types.py"}]}