From a5aced401700cb29d2eefceda67749a13c57e7da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Janek=20Nouvertn=C3=A9?= <25355197+provinzkraut@users.noreply.github.com> Date: Sun, 22 Dec 2024 19:39:29 +0100 Subject: [PATCH] mypy fixes --- litestar/datastructures/response_header.py | 4 ++-- litestar/openapi/spec/header.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/litestar/datastructures/response_header.py b/litestar/datastructures/response_header.py index 377b7b4cb0..e45750b91f 100644 --- a/litestar/datastructures/response_header.py +++ b/litestar/datastructures/response_header.py @@ -122,7 +122,7 @@ def __post_init__(self) -> None: if not self.documentation_only and self.value is None: raise ImproperlyConfiguredException("value must be set if documentation_only is false") - if self.allow_reserved is None: + if self.allow_reserved is None: # type: ignore[unreachable] self.allow_reserved = False else: warn_deprecation( @@ -133,7 +133,7 @@ def __post_init__(self) -> None: info="This property is invalid for headers and will be ignored", ) - if self.allow_empty_value is None: + if self.allow_empty_value is None: # type: ignore[unreachable] self.allow_empty_value = False else: warn_deprecation( diff --git a/litestar/openapi/spec/header.py b/litestar/openapi/spec/header.py index 2f1fc01cf3..bda32258e4 100644 --- a/litestar/openapi/spec/header.py +++ b/litestar/openapi/spec/header.py @@ -126,7 +126,7 @@ def _exclude_fields(self) -> set[str]: return {"name", "param_in", "allow_reserved", "allow_empty_value"} def __post_init__(self) -> None: - if self.allow_reserved is None: + if self.allow_reserved is None: # type: ignore[unreachable] self.allow_reserved = False else: warn_deprecation( @@ -137,7 +137,7 @@ def __post_init__(self) -> None: info="This property is invalid for headers and will be ignored", ) - if self.allow_empty_value is None: + if self.allow_empty_value is None: # type: ignore[unreachable] self.allow_empty_value = False else: warn_deprecation(