prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Missing type annotation in `strawberry.fastapi.BaseContext` causes mypy to trip
  ## Describe the Bug
  
  I built a custom context based on [the guide in the docs](https://strawberry.rocks/docs/guides/authentication):
  
  ```python
  from strawberry.fastapi import BaseContext
  
  class CustomContext(BaseContext):
      @property
      def user(self) -> User:
          ...
  
  async def get_context() -> CustomContext:
      return CustomContext()
  ```
  
  With that I receive the following mypy error:
  ```shell
   error: Call to untyped function "CustomContext" in typed context  [no-untyped-call]
  ```
  
  For now, I added the following workaround to my code:
  ```python
  class CustomContext(BaseContext):
      if typing.TYPE_CHECKING:
          def __init__(self) -> None:
              pass
      
      ...
  ```
  
  ## System Information
  
   - Operating system: macOS Monterey
   - Strawberry version (if applicable): `0.158.1`
   - FastAPI version (if applicable): `0.92.0`
   - mypy version (if applicable): `0.991` (also tested with `1.0.1`)
  
  ## Additional Context
  
  I'm happy to provide a PR to address the issue myself.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `strawberry/fastapi/context.py`
  Content:
  ```
  1 from typing import Any, Dict, Optional, Union
  2 
  3 from starlette.background import BackgroundTasks
  4 from starlette.requests import Request
  5 from starlette.responses import Response
  6 from starlette.websockets import WebSocket
  7 
  8 CustomContext = Union["BaseContext", Dict[str, Any]]
  9 MergedContext = Union[
  10     "BaseContext", Dict[str, Union[Any, BackgroundTasks, Request, Response, WebSocket]]
  11 ]
  12 
  13 
  14 class BaseContext:
  15     connection_params: Optional[Any] = None
  16 
  17     def __init__(self):
  18         self.request: Optional[Union[Request, WebSocket]] = None
  19         self.background_tasks: Optional[BackgroundTasks] = None
  20         self.response: Optional[Response] = None
  21
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/strawberry/fastapi/context.py b/strawberry/fastapi/context.py
  --- a/strawberry/fastapi/context.py
  +++ b/strawberry/fastapi/context.py
  @@ -14,7 +14,7 @@
   class BaseContext:
       connection_params: Optional[Any] = None
   
  -    def __init__(self):
  +    def __init__(self) -> None:
           self.request: Optional[Union[Request, WebSocket]] = None
           self.background_tasks: Optional[BackgroundTasks] = None
           self.response: Optional[Response] = None
  
verification_info: {"golden_diff": "diff --git a/strawberry/fastapi/context.py b/strawberry/fastapi/context.py\n--- a/strawberry/fastapi/context.py\n+++ b/strawberry/fastapi/context.py\n@@ -14,7 +14,7 @@\n class BaseContext:\n     connection_params: Optional[Any] = None\n \n-    def __init__(self):\n+    def __init__(self) -> None:\n         self.request: Optional[Union[Request, WebSocket]] = None\n         self.background_tasks: Optional[BackgroundTasks] = None\n         self.response: Optional[Response] = None\n", "issue": "Missing type annotation in `strawberry.fastapi.BaseContext` causes mypy to trip\n## Describe the Bug\r\n\r\nI built a custom context based on [the guide in the docs](https://strawberry.rocks/docs/guides/authentication):\r\n\r\n```python\r\nfrom strawberry.fastapi import BaseContext\r\n\r\nclass CustomContext(BaseContext):\r\n    @property\r\n    def user(self) -> User:\r\n        ...\r\n\r\nasync def get_context() -> CustomContext:\r\n    return CustomContext()\r\n```\r\n\r\nWith that I receive the following mypy error:\r\n```shell\r\n error: Call to untyped function \"CustomContext\" in typed context  [no-untyped-call]\r\n```\r\n\r\nFor now, I added the following workaround to my code:\r\n```python\r\nclass CustomContext(BaseContext):\r\n    if typing.TYPE_CHECKING:\r\n        def __init__(self) -> None:\r\n            pass\r\n    \r\n    ...\r\n```\r\n\r\n## System Information\r\n\r\n - Operating system: macOS Monterey\r\n - Strawberry version (if applicable): `0.158.1`\r\n - FastAPI version (if applicable): `0.92.0`\r\n - mypy version (if applicable): `0.991` (also tested with `1.0.1`)\r\n\r\n## Additional Context\r\n\r\nI'm happy to provide a PR to address the issue myself.\r\n\n", "before_files": [{"content": "from typing import Any, Dict, Optional, Union\n\nfrom starlette.background import BackgroundTasks\nfrom starlette.requests import Request\nfrom starlette.responses import Response\nfrom starlette.websockets import WebSocket\n\nCustomContext = Union[\"BaseContext\", Dict[str, Any]]\nMergedContext = Union[\n    \"BaseContext\", Dict[str, Union[Any, BackgroundTasks, Request, Response, WebSocket]]\n]\n\n\nclass BaseContext:\n    connection_params: Optional[Any] = None\n\n    def __init__(self):\n        self.request: Optional[Union[Request, WebSocket]] = None\n        self.background_tasks: Optional[BackgroundTasks] = None\n        self.response: Optional[Response] = None\n", "path": "strawberry/fastapi/context.py"}], "after_files": [{"content": "from typing import Any, Dict, Optional, Union\n\nfrom starlette.background import BackgroundTasks\nfrom starlette.requests import Request\nfrom starlette.responses import Response\nfrom starlette.websockets import WebSocket\n\nCustomContext = Union[\"BaseContext\", Dict[str, Any]]\nMergedContext = Union[\n    \"BaseContext\", Dict[str, Union[Any, BackgroundTasks, Request, Response, WebSocket]]\n]\n\n\nclass BaseContext:\n    connection_params: Optional[Any] = None\n\n    def __init__(self) -> None:\n        self.request: Optional[Union[Request, WebSocket]] = None\n        self.background_tasks: Optional[BackgroundTasks] = None\n        self.response: Optional[Response] = None\n", "path": "strawberry/fastapi/context.py"}]}