-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update CacheControl stubs via psf/cachecontrol#279
- Loading branch information
Showing
4 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
class BaseCache: | ||
def get(self, key: str) -> str | None: ... | ||
def set(self, key: str, value: str) -> None: ... | ||
def get(self, key: str) -> bytes | None: ... | ||
def set(self, key: str, value: bytes, expires: int | None = None) -> None: ... | ||
def delete(self, key: str) -> None: ... | ||
def close(self) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,18 @@ | ||
from typing import Collection | ||
|
||
from _typeshed import Incomplete | ||
|
||
logger: Incomplete | ||
URI: Incomplete | ||
from .cache import BaseCache | ||
|
||
class CacheController: | ||
cache: Incomplete | ||
cache_etags: Incomplete | ||
cache: BaseCache | ||
cache_etags: bool | ||
serializer: Incomplete | ||
cacheable_status_codes: Incomplete | ||
cacheable_status_codes: Collection[int] | None = None | ||
def __init__( | ||
self, | ||
cache: Incomplete | None = ..., | ||
cache_etags: bool = ..., | ||
serializer: Incomplete | None = ..., | ||
status_codes: Incomplete | None = ..., | ||
cache: BaseCache | None = None, | ||
cache_etags: bool = True, | ||
serializer: Incomplete | None = None, | ||
status_codes: Collection[int] | None = None, | ||
) -> None: ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
from typing import Collection, Type | ||
|
||
from _typeshed import Incomplete | ||
from requests import Session | ||
|
||
from .cache import BaseCache | ||
from .controller import CacheController | ||
|
||
def CacheControl( | ||
sess: Session, | ||
cache: Incomplete | None = ..., | ||
cache_etags: bool = ..., | ||
serializer: Incomplete | None = ..., | ||
heuristic: Incomplete | None = ..., | ||
controller_class: Incomplete | None = ..., | ||
adapter_class: Incomplete | None = ..., | ||
cacheable_methods: Incomplete | None = ..., | ||
cache: BaseCache | None = None, | ||
cache_etags: bool = True, | ||
serializer: Incomplete | None = None, | ||
heuristic: Incomplete | None = None, | ||
controller_class: Type[CacheController] | None = None, | ||
adapter_class: Incomplete | None = None, | ||
cacheable_methods: Collection[str] | None = None, | ||
) -> Session: ... |