Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typing): fix wrong types #314

Merged
merged 1 commit into from
Jun 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions cachecontrol/serialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
from urllib3 import HTTPResponse

if TYPE_CHECKING:
from requests import PreparedRequest, Request
from requests import PreparedRequest


class Serializer(object):
class Serializer:
serde_version = "4"

def dumps(
Expand Down Expand Up @@ -99,7 +99,7 @@ def loads(

def prepare_response(
self,
request: Request,
request: PreparedRequest,
cached: Mapping[str, Any],
body_file: IO[bytes] | None = None,
) -> HTTPResponse | None:
Expand Down Expand Up @@ -151,7 +151,7 @@ def prepare_response(

def _loads_v0(
self,
request: Request,
request: PreparedRequest,
data: bytes,
body_file: IO[bytes] | None = None,
) -> None:
Expand All @@ -162,7 +162,7 @@ def _loads_v0(

def _loads_v1(
self,
request: Request,
request: PreparedRequest,
data: bytes,
body_file: IO[bytes] | None = None,
) -> HTTPResponse | None:
Expand All @@ -172,7 +172,7 @@ def _loads_v1(

def _loads_v2(
self,
request: Request,
request: PreparedRequest,
data: bytes,
body_file: IO[bytes] | None = None,
) -> HTTPResponse | None:
Expand All @@ -183,7 +183,7 @@ def _loads_v2(

def _loads_v3(
self,
request: Request,
request: PreparedRequest,
data: bytes,
body_file: IO[bytes] | None = None,
) -> None:
Expand All @@ -194,7 +194,7 @@ def _loads_v3(

def _loads_v4(
self,
request: Request,
request: PreparedRequest,
data: bytes,
body_file: IO[bytes] | None = None,
) -> HTTPResponse | None:
Expand Down
4 changes: 1 addition & 3 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
#
# SPDX-License-Identifier: Apache-2.0

-e .
-e .[filecache,redis]

tox
pytest-cov
pytest
cherrypy
sphinx
redis
filelock
bumpversion
twine
black
Expand Down