From 628a094290d3c6a409f193188bf347600cfe69e4 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Sat, 7 Oct 2023 00:57:50 -0500 Subject: [PATCH] ci: apply sourcery (#2412) Co-authored-by: Cody Fincher <204685+cofin@users.noreply.github.com> --- litestar/app.py | 2 +- litestar/contrib/minijnja.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litestar/app.py b/litestar/app.py index c16a9eb4d2..1e4542ff34 100644 --- a/litestar/app.py +++ b/litestar/app.py @@ -479,7 +479,7 @@ def _get_default_plugins(plugins: list[PluginProtocol] | None = None) -> list[Pl plugins.append(PydanticPlugin()) elif not pydantic_plugin_found and pydantic_init_plugin_found and not pydantic_schema_plugin_found: plugins.append(PydanticSchemaPlugin()) - elif not pydantic_plugin_found and not pydantic_init_plugin_found and pydantic_schema_plugin_found: + elif not pydantic_plugin_found and not pydantic_init_plugin_found: plugins.append(PydanticInitPlugin()) with suppress(MissingDependencyException): from litestar.contrib.attrs import AttrsSchemaPlugin diff --git a/litestar/contrib/minijnja.py b/litestar/contrib/minijnja.py index 7b9dabd86e..621de25998 100644 --- a/litestar/contrib/minijnja.py +++ b/litestar/contrib/minijnja.py @@ -91,7 +91,7 @@ def _loader(name: str) -> str: Raises: TemplateNotFoundException: if no template is found. """ - directories = [directory] if not isinstance(directory, list) else directory + directories = directory if isinstance(directory, list) else [directory] for d in directories: template_path = Path(d) / name # pyright: ignore[reportGeneralTypeIssues]