prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <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
  
  </issue>
  <code>
  [start of litestar/contrib/repository/filters.py]
  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 of litestar/contrib/repository/filters.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/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")
  
verification_info: {"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"}]}