Skip to content

Commit

Permalink
Fix CacheControl setter type stubs
Browse files Browse the repository at this point in the history
mypy doesn't use the type of setters as of 1.9.0 (see python/mypy#3004),
but I think it's still good to have these be accurate (maybe the other
type checkers work better here).
  • Loading branch information
RazerM committed Apr 19, 2024
1 parent 71d78d9 commit 333ad19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/werkzeug/datastructures/cache_control.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class _CacheControl(
@property
def no_cache(self) -> str | None: ...
@no_cache.setter
def no_cache(self, value: bool | None) -> None: ...
def no_cache(self, value: Literal[True] | str | None) -> None: ...
@no_cache.deleter
def no_cache(self) -> None: ...
@property
Expand Down Expand Up @@ -83,7 +83,7 @@ class ResponseCacheControl(_CacheControl):
@property
def private(self) -> str | None: ...
@private.setter
def private(self, value: bool | None) -> None: ...
def private(self, value: Literal[True] | str | None) -> None: ...
@private.deleter
def private(self) -> None: ...
@property
Expand Down

0 comments on commit 333ad19

Please sign in to comment.