Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Dec 22, 2024
1 parent 6aa7dbf commit a5aced4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions litestar/datastructures/response_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions litestar/openapi/spec/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand Down

0 comments on commit a5aced4

Please sign in to comment.