prompt: 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/cli/main.py`
  Content:
  ```
  1 from __future__ import annotations
  2 
  3 import sys
  4 from pathlib import Path
  5 from typing import TYPE_CHECKING
  6 
  7 from ._utils import RICH_CLICK_INSTALLED, LitestarEnv, LitestarExtensionGroup
  8 from .commands import core, schema, sessions
  9 
  10 if TYPE_CHECKING or not RICH_CLICK_INSTALLED:  # pragma: no cover
  11     import click
  12     from click import Context, group, option, pass_context
  13     from click import Path as ClickPath
  14 else:
  15     import rich_click as click
  16     from rich_click import Context, group, option, pass_context
  17     from rich_click import Path as ClickPath
  18     from rich_click.cli import patch as rich_click_patch
  19 
  20     rich_click_patch()
  21     click.rich_click.USE_RICH_MARKUP = True
  22     click.rich_click.USE_MARKDOWN = False
  23     click.rich_click.SHOW_ARGUMENTS = True
  24     click.rich_click.GROUP_ARGUMENTS_OPTIONS = True
  25     click.rich_click.SHOW_ARGUMENTS = True
  26     click.rich_click.GROUP_ARGUMENTS_OPTIONS = True
  27     click.rich_click.STYLE_ERRORS_SUGGESTION = "magenta italic"
  28     click.rich_click.ERRORS_SUGGESTION = ""
  29     click.rich_click.ERRORS_EPILOGUE = ""
  30     click.rich_click.MAX_WIDTH = 100
  31     click.rich_click.SHOW_METAVARS_COLUMN = True
  32     click.rich_click.APPEND_METAVARS_HELP = True
  33 
  34 
  35 __all__ = ("litestar_group",)
  36 
  37 
  38 @group(cls=LitestarExtensionGroup, context_settings={"help_option_names": ["-h", "--help"]})
  39 @option("--app", "app_path", help="Module path to a Litestar application")
  40 @option(
  41     "--app-dir",
  42     help="Look for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.",
  43     default=None,
  44     type=ClickPath(dir_okay=True, file_okay=False, path_type=Path),
  45     show_default=False,
  46 )
  47 @pass_context
  48 def litestar_group(ctx: Context, app_path: str | None, app_dir: Path | None = None) -> None:
  49     """Litestar CLI."""
  50     sys.path.append(str(app_dir))
  51 
  52     if ctx.obj is None:  # env has not been loaded yet, so we can lazy load it
  53         ctx.obj = lambda: LitestarEnv.from_env(app_path)
  54 
  55 
  56 # add sub commands here
  57 
  58 litestar_group.add_command(core.info_command)
  59 litestar_group.add_command(core.run_command)
  60 litestar_group.add_command(core.routes_command)
  61 litestar_group.add_command(core.version_command)
  62 litestar_group.add_command(sessions.sessions_group)
  63 litestar_group.add_command(schema.schema_group)
  64
  ```
  --- 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/litestar/cli/main.py b/litestar/cli/main.py
  --- a/litestar/cli/main.py
  +++ b/litestar/cli/main.py
  @@ -27,7 +27,7 @@
       click.rich_click.STYLE_ERRORS_SUGGESTION = "magenta italic"
       click.rich_click.ERRORS_SUGGESTION = ""
       click.rich_click.ERRORS_EPILOGUE = ""
  -    click.rich_click.MAX_WIDTH = 100
  +    click.rich_click.MAX_WIDTH = 80
       click.rich_click.SHOW_METAVARS_COLUMN = True
       click.rich_click.APPEND_METAVARS_HELP = True
  
verification_info: {"golden_diff": "diff --git a/litestar/cli/main.py b/litestar/cli/main.py\n--- a/litestar/cli/main.py\n+++ b/litestar/cli/main.py\n@@ -27,7 +27,7 @@\n     click.rich_click.STYLE_ERRORS_SUGGESTION = \"magenta italic\"\n     click.rich_click.ERRORS_SUGGESTION = \"\"\n     click.rich_click.ERRORS_EPILOGUE = \"\"\n-    click.rich_click.MAX_WIDTH = 100\n+    click.rich_click.MAX_WIDTH = 80\n     click.rich_click.SHOW_METAVARS_COLUMN = True\n     click.rich_click.APPEND_METAVARS_HELP = True\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": "from __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom ._utils import RICH_CLICK_INSTALLED, LitestarEnv, LitestarExtensionGroup\nfrom .commands import core, schema, sessions\n\nif TYPE_CHECKING or not RICH_CLICK_INSTALLED:  # pragma: no cover\n    import click\n    from click import Context, group, option, pass_context\n    from click import Path as ClickPath\nelse:\n    import rich_click as click\n    from rich_click import Context, group, option, pass_context\n    from rich_click import Path as ClickPath\n    from rich_click.cli import patch as rich_click_patch\n\n    rich_click_patch()\n    click.rich_click.USE_RICH_MARKUP = True\n    click.rich_click.USE_MARKDOWN = False\n    click.rich_click.SHOW_ARGUMENTS = True\n    click.rich_click.GROUP_ARGUMENTS_OPTIONS = True\n    click.rich_click.SHOW_ARGUMENTS = True\n    click.rich_click.GROUP_ARGUMENTS_OPTIONS = True\n    click.rich_click.STYLE_ERRORS_SUGGESTION = \"magenta italic\"\n    click.rich_click.ERRORS_SUGGESTION = \"\"\n    click.rich_click.ERRORS_EPILOGUE = \"\"\n    click.rich_click.MAX_WIDTH = 100\n    click.rich_click.SHOW_METAVARS_COLUMN = True\n    click.rich_click.APPEND_METAVARS_HELP = True\n\n\n__all__ = (\"litestar_group\",)\n\n\n@group(cls=LitestarExtensionGroup, context_settings={\"help_option_names\": [\"-h\", \"--help\"]})\n@option(\"--app\", \"app_path\", help=\"Module path to a Litestar application\")\n@option(\n    \"--app-dir\",\n    help=\"Look for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.\",\n    default=None,\n    type=ClickPath(dir_okay=True, file_okay=False, path_type=Path),\n    show_default=False,\n)\n@pass_context\ndef litestar_group(ctx: Context, app_path: str | None, app_dir: Path | None = None) -> None:\n    \"\"\"Litestar CLI.\"\"\"\n    sys.path.append(str(app_dir))\n\n    if ctx.obj is None:  # env has not been loaded yet, so we can lazy load it\n        ctx.obj = lambda: LitestarEnv.from_env(app_path)\n\n\n# add sub commands here\n\nlitestar_group.add_command(core.info_command)\nlitestar_group.add_command(core.run_command)\nlitestar_group.add_command(core.routes_command)\nlitestar_group.add_command(core.version_command)\nlitestar_group.add_command(sessions.sessions_group)\nlitestar_group.add_command(schema.schema_group)\n", "path": "litestar/cli/main.py"}], "after_files": [{"content": "from __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import TYPE_CHECKING\n\nfrom ._utils import RICH_CLICK_INSTALLED, LitestarEnv, LitestarExtensionGroup\nfrom .commands import core, schema, sessions\n\nif TYPE_CHECKING or not RICH_CLICK_INSTALLED:  # pragma: no cover\n    import click\n    from click import Context, group, option, pass_context\n    from click import Path as ClickPath\nelse:\n    import rich_click as click\n    from rich_click import Context, group, option, pass_context\n    from rich_click import Path as ClickPath\n    from rich_click.cli import patch as rich_click_patch\n\n    rich_click_patch()\n    click.rich_click.USE_RICH_MARKUP = True\n    click.rich_click.USE_MARKDOWN = False\n    click.rich_click.SHOW_ARGUMENTS = True\n    click.rich_click.GROUP_ARGUMENTS_OPTIONS = True\n    click.rich_click.SHOW_ARGUMENTS = True\n    click.rich_click.GROUP_ARGUMENTS_OPTIONS = True\n    click.rich_click.STYLE_ERRORS_SUGGESTION = \"magenta italic\"\n    click.rich_click.ERRORS_SUGGESTION = \"\"\n    click.rich_click.ERRORS_EPILOGUE = \"\"\n    click.rich_click.MAX_WIDTH = 80\n    click.rich_click.SHOW_METAVARS_COLUMN = True\n    click.rich_click.APPEND_METAVARS_HELP = True\n\n\n__all__ = (\"litestar_group\",)\n\n\n@group(cls=LitestarExtensionGroup, context_settings={\"help_option_names\": [\"-h\", \"--help\"]})\n@option(\"--app\", \"app_path\", help=\"Module path to a Litestar application\")\n@option(\n    \"--app-dir\",\n    help=\"Look for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.\",\n    default=None,\n    type=ClickPath(dir_okay=True, file_okay=False, path_type=Path),\n    show_default=False,\n)\n@pass_context\ndef litestar_group(ctx: Context, app_path: str | None, app_dir: Path | None = None) -> None:\n    \"\"\"Litestar CLI.\"\"\"\n    sys.path.append(str(app_dir))\n\n    if ctx.obj is None:  # env has not been loaded yet, so we can lazy load it\n        ctx.obj = lambda: LitestarEnv.from_env(app_path)\n\n\n# add sub commands here\n\nlitestar_group.add_command(core.info_command)\nlitestar_group.add_command(core.run_command)\nlitestar_group.add_command(core.routes_command)\nlitestar_group.add_command(core.version_command)\nlitestar_group.add_command(sessions.sessions_group)\nlitestar_group.add_command(schema.schema_group)\n", "path": "litestar/cli/main.py"}]}