We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Enhancement: Only run Sonar & Snyk on forks
### Summary

When forking the repo, tests are brought with it but Snyk & Sonar CI fails because the secrets are not set.

### Basic Example

Add ` && github.repository_owner == 'starlite-api'` to the if-check in `ci.yaml` to prevent these two CI items from running on non-upstream repos.

### Drawbacks and Impact

_No response_

### Unresolved questions

_No response_

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `litestar/types/composite_types.py`
Content:
```
1 from functools import partial
2 from os import PathLike
3 from pathlib import Path
4 from typing import (
5     TYPE_CHECKING,
6     Any,
7     AsyncIterable,
8     AsyncIterator,
9     Callable,
10     Dict,
11     Iterable,
12     Iterator,
13     Literal,
14     Mapping,
15     Sequence,
16     Set,
17     Tuple,
18     Type,
19     TypeVar,
20     Union,
21 )
22 
23 from litestar.enums import ScopeType
24 
25 from .asgi_types import ASGIApp
26 from .callable_types import AnyCallable, ExceptionHandler
27 
28 if TYPE_CHECKING:
29     from litestar.datastructures.cookie import Cookie
30     from litestar.datastructures.response_header import ResponseHeader
31     from litestar.di import Provide
32     from litestar.middleware.base import DefineMiddleware, MiddlewareProtocol
33     from litestar.params import ParameterKwarg
34 else:
35     BaseHTTPMiddleware = Any
36     Cookie = Any
37     DefineMiddleware = Any
38     ImmutableState = Any
39     MiddlewareProtocol = Any
40     ParameterKwarg = Any
41     Provide = Any
42     ResponseHeader = Any
43 
44 T = TypeVar("T")
45 
46 
47 Dependencies = Mapping[str, Union[Provide, AnyCallable]]
48 ExceptionHandlersMap = Mapping[Union[int, Type[Exception]], ExceptionHandler]
49 MaybePartial = Union[T, partial]
50 Middleware = Union[
51     Callable[..., ASGIApp], DefineMiddleware, Iterator[Tuple[ASGIApp, Dict[str, Any]]], Type[MiddlewareProtocol]
52 ]
53 ParametersMap = Mapping[str, ParameterKwarg]
54 PathType = Union[Path, PathLike, str]
55 ResponseCookies = Union[Sequence[Cookie], Mapping[str, str]]
56 ResponseHeaders = Union[Sequence[ResponseHeader], Mapping[str, str]]
57 Scopes = Set[Literal[ScopeType.HTTP, ScopeType.WEBSOCKET]]
58 StreamType = Union[Iterable[T], Iterator[T], AsyncIterable[T], AsyncIterator[T]]
59 TypeEncodersMap = Mapping[Any, Callable[[Any], Any]]
60
```
--- 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()

```

diff --git a/litestar/types/composite_types.py b/litestar/types/composite_types.py
--- a/litestar/types/composite_types.py
+++ b/litestar/types/composite_types.py
@@ -12,6 +12,7 @@
     Iterator,
     Literal,
     Mapping,
+    MutableMapping,
     Sequence,
     Set,
     Tuple,
@@ -45,7 +46,7 @@
 
 
 Dependencies = Mapping[str, Union[Provide, AnyCallable]]
-ExceptionHandlersMap = Mapping[Union[int, Type[Exception]], ExceptionHandler]
+ExceptionHandlersMap = MutableMapping[Union[int, Type[Exception]], ExceptionHandler]
 MaybePartial = Union[T, partial]
 Middleware = Union[
     Callable[..., ASGIApp], DefineMiddleware, Iterator[Tuple[ASGIApp, Dict[str, Any]]], Type[MiddlewareProtocol]

{"golden_diff": "diff --git a/litestar/types/composite_types.py b/litestar/types/composite_types.py\n--- a/litestar/types/composite_types.py\n+++ b/litestar/types/composite_types.py\n@@ -12,6 +12,7 @@\n     Iterator,\n     Literal,\n     Mapping,\n+    MutableMapping,\n     Sequence,\n     Set,\n     Tuple,\n@@ -45,7 +46,7 @@\n \n \n Dependencies = Mapping[str, Union[Provide, AnyCallable]]\n-ExceptionHandlersMap = Mapping[Union[int, Type[Exception]], ExceptionHandler]\n+ExceptionHandlersMap = MutableMapping[Union[int, Type[Exception]], ExceptionHandler]\n MaybePartial = Union[T, partial]\n Middleware = Union[\n     Callable[..., ASGIApp], DefineMiddleware, Iterator[Tuple[ASGIApp, Dict[str, Any]]], Type[MiddlewareProtocol]\n", "issue": "Enhancement: Only run Sonar & Snyk on forks\n### Summary\n\nWhen forking the repo, tests are brought with it but Snyk & Sonar CI fails because the secrets are not set.\n\n### Basic Example\n\nAdd ` && github.repository_owner == 'starlite-api'` to the if-check in `ci.yaml` to prevent these two CI items from running on non-upstream repos.\n\n### Drawbacks and Impact\n\n_No response_\n\n### Unresolved questions\n\n_No response_\n", "before_files": [{"content": "from functools import partial\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    AsyncIterable,\n    AsyncIterator,\n    Callable,\n    Dict,\n    Iterable,\n    Iterator,\n    Literal,\n    Mapping,\n    Sequence,\n    Set,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n)\n\nfrom litestar.enums import ScopeType\n\nfrom .asgi_types import ASGIApp\nfrom .callable_types import AnyCallable, ExceptionHandler\n\nif TYPE_CHECKING:\n    from litestar.datastructures.cookie import Cookie\n    from litestar.datastructures.response_header import ResponseHeader\n    from litestar.di import Provide\n    from litestar.middleware.base import DefineMiddleware, MiddlewareProtocol\n    from litestar.params import ParameterKwarg\nelse:\n    BaseHTTPMiddleware = Any\n    Cookie = Any\n    DefineMiddleware = Any\n    ImmutableState = Any\n    MiddlewareProtocol = Any\n    ParameterKwarg = Any\n    Provide = Any\n    ResponseHeader = Any\n\nT = TypeVar(\"T\")\n\n\nDependencies = Mapping[str, Union[Provide, AnyCallable]]\nExceptionHandlersMap = Mapping[Union[int, Type[Exception]], ExceptionHandler]\nMaybePartial = Union[T, partial]\nMiddleware = Union[\n    Callable[..., ASGIApp], DefineMiddleware, Iterator[Tuple[ASGIApp, Dict[str, Any]]], Type[MiddlewareProtocol]\n]\nParametersMap = Mapping[str, ParameterKwarg]\nPathType = Union[Path, PathLike, str]\nResponseCookies = Union[Sequence[Cookie], Mapping[str, str]]\nResponseHeaders = Union[Sequence[ResponseHeader], Mapping[str, str]]\nScopes = Set[Literal[ScopeType.HTTP, ScopeType.WEBSOCKET]]\nStreamType = Union[Iterable[T], Iterator[T], AsyncIterable[T], AsyncIterator[T]]\nTypeEncodersMap = Mapping[Any, Callable[[Any], Any]]\n", "path": "litestar/types/composite_types.py"}], "after_files": [{"content": "from functools import partial\nfrom os import PathLike\nfrom pathlib import Path\nfrom typing import (\n    TYPE_CHECKING,\n    Any,\n    AsyncIterable,\n    AsyncIterator,\n    Callable,\n    Dict,\n    Iterable,\n    Iterator,\n    Literal,\n    Mapping,\n    MutableMapping,\n    Sequence,\n    Set,\n    Tuple,\n    Type,\n    TypeVar,\n    Union,\n)\n\nfrom litestar.enums import ScopeType\n\nfrom .asgi_types import ASGIApp\nfrom .callable_types import AnyCallable, ExceptionHandler\n\nif TYPE_CHECKING:\n    from litestar.datastructures.cookie import Cookie\n    from litestar.datastructures.response_header import ResponseHeader\n    from litestar.di import Provide\n    from litestar.middleware.base import DefineMiddleware, MiddlewareProtocol\n    from litestar.params import ParameterKwarg\nelse:\n    BaseHTTPMiddleware = Any\n    Cookie = Any\n    DefineMiddleware = Any\n    ImmutableState = Any\n    MiddlewareProtocol = Any\n    ParameterKwarg = Any\n    Provide = Any\n    ResponseHeader = Any\n\nT = TypeVar(\"T\")\n\n\nDependencies = Mapping[str, Union[Provide, AnyCallable]]\nExceptionHandlersMap = MutableMapping[Union[int, Type[Exception]], ExceptionHandler]\nMaybePartial = Union[T, partial]\nMiddleware = Union[\n    Callable[..., ASGIApp], DefineMiddleware, Iterator[Tuple[ASGIApp, Dict[str, Any]]], Type[MiddlewareProtocol]\n]\nParametersMap = Mapping[str, ParameterKwarg]\nPathType = Union[Path, PathLike, str]\nResponseCookies = Union[Sequence[Cookie], Mapping[str, str]]\nResponseHeaders = Union[Sequence[ResponseHeader], Mapping[str, str]]\nScopes = Set[Literal[ScopeType.HTTP, ScopeType.WEBSOCKET]]\nStreamType = Union[Iterable[T], Iterator[T], AsyncIterable[T], AsyncIterator[T]]\nTypeEncodersMap = Mapping[Any, Callable[[Any], Any]]\n", "path": "litestar/types/composite_types.py"}]}