We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
StaticFilesConfig and virtual directories
I'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/using.html#). But because ``directories`` is defined as ``DirectoryPath``, pydantic checks if the given directories exist in the local filesystem. 

This is not generally true, especially in any kind of virtual filesystem (e.g. a zipped package). I think this condition should be relaxed to support virtual filesystems.

https://github.com/starlite-api/starlite/blob/9bb6dcd57c10a591377cf8e3a537e9292566d5b9/starlite/config/static_files.py#L32

--- 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/contrib/repository/filters.py`
Content:
```
1 """Collection filter datastructures."""
2 from __future__ import annotations
3 
4 from dataclasses import dataclass
5 from datetime import datetime  # noqa: TCH003
6 from typing import TYPE_CHECKING, Generic, Literal, TypeVar
7 
8 if TYPE_CHECKING:
9     from collections import abc
10 
11 
12 T = TypeVar("T")
13 
14 __all__ = ["BeforeAfter", "CollectionFilter", "LimitOffset", "OrderBy", "SearchFilter"]
15 
16 
17 @dataclass
18 class BeforeAfter:
19     """Data required to filter a query on a ``datetime`` column."""
20 
21     field_name: str
22     """Name of the model attribute to filter on."""
23     before: datetime | None
24     """Filter results where field earlier than this."""
25     after: datetime | None
26     """Filter results where field later than this."""
27 
28 
29 @dataclass
30 class CollectionFilter(Generic[T]):
31     """Data required to construct a ``WHERE ... IN (...)`` clause."""
32 
33     field_name: str
34     """Name of the model attribute to filter on."""
35     values: abc.Collection[T]
36     """Values for ``IN`` clause."""
37 
38 
39 @dataclass
40 class LimitOffset:
41     """Data required to add limit/offset filtering to a query."""
42 
43     limit: int
44     """Value for ``LIMIT`` clause of query."""
45     offset: int
46     """Value for ``OFFSET`` clause of query."""
47 
48 
49 @dataclass
50 class OrderBy:
51     """Data required to construct a ``ORDER BY ...`` clause."""
52 
53     field_name: str
54     """Name of the model attribute to sort on."""
55     sort_order: Literal["asc", "desc"] = "asc"
56     """Sort ascending or descending"""
57 
58 
59 @dataclass
60 class SearchFilter:
61     """Data required to construct a ``WHERE field_name LIKE '%' || :value || '%'`` clause."""
62 
63     field_name: str
64     """Name of the model attribute to sort on."""
65     value: str
66     """Values for ``LIKE`` clause."""
67     ignore_case: bool | None = False
68     """Should the search be case insensitive."""
69
```
--- 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/contrib/repository/filters.py b/litestar/contrib/repository/filters.py
--- a/litestar/contrib/repository/filters.py
+++ b/litestar/contrib/repository/filters.py
@@ -1,13 +1,10 @@
 """Collection filter datastructures."""
 from __future__ import annotations
 
+from collections import abc  # noqa: TCH003
 from dataclasses import dataclass
 from datetime import datetime  # noqa: TCH003
-from typing import TYPE_CHECKING, Generic, Literal, TypeVar
-
-if TYPE_CHECKING:
-    from collections import abc
-
+from typing import Generic, Literal, TypeVar
 
 T = TypeVar("T")

{"golden_diff": "diff --git a/litestar/contrib/repository/filters.py b/litestar/contrib/repository/filters.py\n--- a/litestar/contrib/repository/filters.py\n+++ b/litestar/contrib/repository/filters.py\n@@ -1,13 +1,10 @@\n \"\"\"Collection filter datastructures.\"\"\"\n from __future__ import annotations\n \n+from collections import abc  # noqa: TCH003\n from dataclasses import dataclass\n from datetime import datetime  # noqa: TCH003\n-from typing import TYPE_CHECKING, Generic, Literal, TypeVar\n-\n-if TYPE_CHECKING:\n-    from collections import abc\n-\n+from typing import Generic, Literal, TypeVar\n \n T = TypeVar(\"T\")\n", "issue": "StaticFilesConfig and virtual directories\nI'm trying to write a ``FileSystemProtocol`` to load files from the package data using [importlib_resources](https://importlib-resources.readthedocs.io/en/latest/using.html#). But because ``directories`` is defined as ``DirectoryPath``, pydantic checks if the given directories exist in the local filesystem. \r\n\r\nThis is not generally true, especially in any kind of virtual filesystem (e.g. a zipped package). I think this condition should be relaxed to support virtual filesystems.\r\n\r\nhttps://github.com/starlite-api/starlite/blob/9bb6dcd57c10a591377cf8e3a537e9292566d5b9/starlite/config/static_files.py#L32\n", "before_files": [{"content": "\"\"\"Collection filter datastructures.\"\"\"\nfrom __future__ import annotations\n\nfrom dataclasses import dataclass\nfrom datetime import datetime  # noqa: TCH003\nfrom typing import TYPE_CHECKING, Generic, Literal, TypeVar\n\nif TYPE_CHECKING:\n    from collections import abc\n\n\nT = TypeVar(\"T\")\n\n__all__ = [\"BeforeAfter\", \"CollectionFilter\", \"LimitOffset\", \"OrderBy\", \"SearchFilter\"]\n\n\n@dataclass\nclass BeforeAfter:\n    \"\"\"Data required to filter a query on a ``datetime`` column.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to filter on.\"\"\"\n    before: datetime | None\n    \"\"\"Filter results where field earlier than this.\"\"\"\n    after: datetime | None\n    \"\"\"Filter results where field later than this.\"\"\"\n\n\n@dataclass\nclass CollectionFilter(Generic[T]):\n    \"\"\"Data required to construct a ``WHERE ... IN (...)`` clause.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to filter on.\"\"\"\n    values: abc.Collection[T]\n    \"\"\"Values for ``IN`` clause.\"\"\"\n\n\n@dataclass\nclass LimitOffset:\n    \"\"\"Data required to add limit/offset filtering to a query.\"\"\"\n\n    limit: int\n    \"\"\"Value for ``LIMIT`` clause of query.\"\"\"\n    offset: int\n    \"\"\"Value for ``OFFSET`` clause of query.\"\"\"\n\n\n@dataclass\nclass OrderBy:\n    \"\"\"Data required to construct a ``ORDER BY ...`` clause.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to sort on.\"\"\"\n    sort_order: Literal[\"asc\", \"desc\"] = \"asc\"\n    \"\"\"Sort ascending or descending\"\"\"\n\n\n@dataclass\nclass SearchFilter:\n    \"\"\"Data required to construct a ``WHERE field_name LIKE '%' || :value || '%'`` clause.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to sort on.\"\"\"\n    value: str\n    \"\"\"Values for ``LIKE`` clause.\"\"\"\n    ignore_case: bool | None = False\n    \"\"\"Should the search be case insensitive.\"\"\"\n", "path": "litestar/contrib/repository/filters.py"}], "after_files": [{"content": "\"\"\"Collection filter datastructures.\"\"\"\nfrom __future__ import annotations\n\nfrom collections import abc  # noqa: TCH003\nfrom dataclasses import dataclass\nfrom datetime import datetime  # noqa: TCH003\nfrom typing import Generic, Literal, TypeVar\n\nT = TypeVar(\"T\")\n\n__all__ = [\"BeforeAfter\", \"CollectionFilter\", \"LimitOffset\", \"OrderBy\", \"SearchFilter\"]\n\n\n@dataclass\nclass BeforeAfter:\n    \"\"\"Data required to filter a query on a ``datetime`` column.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to filter on.\"\"\"\n    before: datetime | None\n    \"\"\"Filter results where field earlier than this.\"\"\"\n    after: datetime | None\n    \"\"\"Filter results where field later than this.\"\"\"\n\n\n@dataclass\nclass CollectionFilter(Generic[T]):\n    \"\"\"Data required to construct a ``WHERE ... IN (...)`` clause.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to filter on.\"\"\"\n    values: abc.Collection[T]\n    \"\"\"Values for ``IN`` clause.\"\"\"\n\n\n@dataclass\nclass LimitOffset:\n    \"\"\"Data required to add limit/offset filtering to a query.\"\"\"\n\n    limit: int\n    \"\"\"Value for ``LIMIT`` clause of query.\"\"\"\n    offset: int\n    \"\"\"Value for ``OFFSET`` clause of query.\"\"\"\n\n\n@dataclass\nclass OrderBy:\n    \"\"\"Data required to construct a ``ORDER BY ...`` clause.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to sort on.\"\"\"\n    sort_order: Literal[\"asc\", \"desc\"] = \"asc\"\n    \"\"\"Sort ascending or descending\"\"\"\n\n\n@dataclass\nclass SearchFilter:\n    \"\"\"Data required to construct a ``WHERE field_name LIKE '%' || :value || '%'`` clause.\"\"\"\n\n    field_name: str\n    \"\"\"Name of the model attribute to sort on.\"\"\"\n    value: str\n    \"\"\"Values for ``LIKE`` clause.\"\"\"\n    ignore_case: bool | None = False\n    \"\"\"Should the search be case insensitive.\"\"\"\n", "path": "litestar/contrib/repository/filters.py"}]}