Skip to content

Commit c3a19f5

Browse files
authored
update some other stubs that depended on types-requests
1 parent aaba5b0 commit c3a19f5

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from hvac.api.system_backend.system_backend_mixin import SystemBackendMixin
2-
from requests.models import _JSON
2+
from requests._types import JsonType
33

44
class Wrapping(SystemBackendMixin):
55
def unwrap(self, token=None): ...
6-
def wrap(self, payload: _JSON | None = None, ttl: int = 60): ...
6+
def wrap(self, payload: JsonType = None, ttl: int = 60): ...

stubs/python-jenkins/jenkins/__init__.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from typing_extensions import Required, deprecated
66

77
import requests
88
from requests.models import Request, Response
9-
from requests.sessions import _Auth
9+
from requests._types import AuthType
1010

1111
LAUNCHER_SSH: Final[str]
1212
LAUNCHER_COMMAND: Final[str]
@@ -103,7 +103,7 @@ class _Job(TypedDict, total=False):
103103

104104
class Jenkins:
105105
server: str
106-
auth: _Auth | None
106+
auth: AuthType | None
107107
crumb: Mapping[str, Incomplete] | bool | Incomplete
108108
timeout: int
109109
def __init__(

stubs/slumber/slumber/__init__.pyi

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from typing import Any
22
from typing_extensions import Self
33

44
from requests import Response, Session
5-
from requests.sessions import _Auth, _Data, _Files, _ParamsMappingValueType
5+
from requests._types import AuthType, DataType, FilesType, _ParamsMappingValueType
66

77
from .serialize import Serializer
88

@@ -18,9 +18,9 @@ class Resource(ResourceAttributesMixin):
1818
def get(self, **kwargs: _ParamsMappingValueType) -> Response: ...
1919
def options(self, **kwargs: _ParamsMappingValueType) -> Response: ...
2020
def head(self, **kwargs: _ParamsMappingValueType) -> Response: ...
21-
def post(self, data: _Data | None = None, files: _Files | None = None, **kwargs: _ParamsMappingValueType) -> Response: ...
22-
def patch(self, data: _Data | None = None, files: _Files | None = None, **kwargs: _ParamsMappingValueType) -> Response: ...
23-
def put(self, data: _Data | None = None, files: _Files | None = None, **kwargs: _ParamsMappingValueType) -> Response: ...
21+
def post(self, data: DataType | None = None, files: FilesType | None = None, **kwargs: _ParamsMappingValueType) -> Response: ...
22+
def patch(self, data: DataType | None = None, files: FilesType | None = None, **kwargs: _ParamsMappingValueType) -> Response: ...
23+
def put(self, data: DataType | None = None, files: FilesType | None = None, **kwargs: _ParamsMappingValueType) -> Response: ...
2424
def delete(self, **kwargs: _ParamsMappingValueType) -> Response: ...
2525
def url(self) -> str: ...
2626

@@ -29,7 +29,7 @@ class API(ResourceAttributesMixin):
2929
def __init__(
3030
self,
3131
base_url: str | None = None,
32-
auth: _Auth | None = None,
32+
auth: AuthType | None = None,
3333
format: str | None = None,
3434
append_slash: bool = True,
3535
session: Session | None = None,

stubs/tensorflow/tensorflow/keras/callbacks.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ from collections.abc import Callable, Mapping, Sequence
22
from typing import Any, Literal, TypeAlias
33

44
import tensorflow as tf
5-
from requests.api import _HeadersMapping
5+
from requests._types import HeadersType
66
from tensorflow.keras import Model
77
from tensorflow.keras.optimizers.schedules import LearningRateSchedule
88

@@ -143,7 +143,7 @@ class RemoteMonitor(Callback):
143143
root: str = "http://localhost:9000",
144144
path: str = "/publish/epoch/end/",
145145
field: str = "data",
146-
headers: _HeadersMapping | None = None,
146+
headers: HeadersType = None,
147147
send_as_json: bool = False,
148148
) -> None: ...
149149

0 commit comments

Comments
 (0)