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(