Skip to content
  •  
  •  
  •  
10 changes: 6 additions & 4 deletions stubs/Authlib/authlib/common/encoding.pyi
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from _typeshed import ReadableBuffer
from _typeshed import FloatInt, ReadableBuffer
from collections.abc import Iterable
from typing import Any, SupportsBytes, SupportsIndex, overload

@overload
def to_bytes(x: None, charset: str = "utf-8", errors: str = "strict") -> None: ...
@overload
def to_bytes(
x: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
x: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
charset: str = "utf-8",
errors: str = "strict",
) -> bytes: ...
Expand All @@ -21,8 +21,10 @@ def json_loads(s: str | bytes | bytearray) -> Any: ... # returns json.loads()
def json_dumps(data: Any, ensure_ascii: bool = False) -> str: ... # data pass to json.dumps()
def urlsafe_b64decode(s: bytes | bytearray) -> bytes: ...
def urlsafe_b64encode(s: ReadableBuffer) -> bytes: ...
def base64_to_int(s: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer) -> int: ...
def base64_to_int(
s: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
) -> int: ...
def int_to_base64(num: int) -> str: ...
def json_b64encode(
text: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
text: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
) -> bytes: ...
5 changes: 3 additions & 2 deletions stubs/Authlib/authlib/common/urls.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import FloatInt
from collections.abc import Iterable
from re import Pattern
from typing import Final, overload
Expand All @@ -10,9 +11,9 @@ def url_encode(params: Iterable[tuple[str, str]]) -> str: ...
def url_decode(query: str) -> list[tuple[str, str]]: ...
def add_params_to_qs(query: str, params: Iterable[tuple[str, str]] | dict[str, str]) -> str: ...
def add_params_to_uri(uri: str, params: Iterable[tuple[str, str]] | dict[str, str], fragment: bool = False) -> str: ...
def quote(s: str | bytes | float, safe: bytes = b"/") -> str: ...
def quote(s: str | bytes | FloatInt, safe: bytes = b"/") -> str: ...
def unquote(s: str | bytes) -> str: ...
def quote_url(s: str | bytes | float) -> str: ...
def quote_url(s: str | bytes | FloatInt) -> str: ...

@overload
def extract_params(raw: None) -> None: ...
Expand Down
2 changes: 1 addition & 1 deletion stubs/Authlib/authlib/integrations/django_oauth1/nonce.pyi
Original file line number Diff line number Diff line change
@@ -1 +1 @@
def exists_nonce_in_cache(nonce, request, timeout: int | float | None) -> bool: ...
def exists_nonce_in_cache(nonce, request, timeout: float | int | None) -> bool: ...
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import FloatInt
from collections.abc import Callable
from http.cookiejar import CookieJar
from typing import Any, ClassVar, TypeVar
Expand Down Expand Up @@ -40,7 +41,7 @@ class OAuth2Session(OAuth2Client, Session):
token_auth_class: ClassVar[type[OAuth2Auth]]
oauth_error_class: ClassVar[type[OAuthError]]
SESSION_REQUEST_PARAMS: ClassVar[tuple[str, ...]]
default_timeout: float | tuple[float | None, float | None] | None
default_timeout: FloatInt | tuple[FloatInt | None, FloatInt | None] | None
def __init__(
self,
client_id: str | None = None,
Expand All @@ -54,7 +55,7 @@ class OAuth2Session(OAuth2Client, Session):
token_placement: str = ...,
update_token: Callable[[OAuth2Token], None] | None = None,
leeway: int = 60,
default_timeout: float | tuple[float | None, float | None] | None = None,
default_timeout: FloatInt | tuple[FloatInt | None, FloatInt | None] | None = None,
**kwargs,
) -> None: ...
def fetch_access_token(self, url: str | None = None, **kwargs) -> OAuth2Token: ...
Expand Down
7 changes: 5 additions & 2 deletions stubs/Authlib/authlib/jose/rfc7515/jws.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Incomplete, ReadableBuffer
from _typeshed import FloatInt, Incomplete, ReadableBuffer
from collections.abc import Iterable
from typing import SupportsBytes, SupportsIndex

Expand All @@ -13,7 +13,10 @@ class JsonWebSignature:
def register_algorithm(cls, algorithm: JWSAlgorithm) -> None: ...
def serialize_compact(self, protected, payload, key) -> bytes: ...
def deserialize_compact(
self, s: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer, key, decode=None
self,
s: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
key,
decode=None,
) -> JWSObject: ...
def serialize_json(self, header_obj, payload, key) -> dict[str, Incomplete]: ...
def deserialize_json(self, obj, key, decode=None) -> JWSObject: ...
Expand Down
4 changes: 2 additions & 2 deletions stubs/Authlib/authlib/jose/rfc7516/jwe.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Incomplete, ReadableBuffer
from _typeshed import FloatInt, Incomplete, ReadableBuffer
from collections import OrderedDict
from collections.abc import Iterable
from typing import SupportsBytes, SupportsIndex
Expand All @@ -18,7 +18,7 @@ class JsonWebEncryption:
def serialize(self, header, payload, key, sender_key=None) -> OrderedDict[Incomplete, Incomplete] | bytes: ...
def deserialize_compact(
self,
s: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
s: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
key,
decode=None,
sender_key=None,
Expand Down
10 changes: 5 additions & 5 deletions stubs/Authlib/authlib/jose/rfc7517/_cryptography_key.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import ReadableBuffer
from _typeshed import FloatInt, ReadableBuffer
from collections.abc import Iterable
from typing import Literal, SupportsBytes, SupportsIndex, overload

Expand All @@ -7,28 +7,28 @@ from cryptography.hazmat.primitives.serialization.ssh import SSHPublicKeyTypes

@overload # if ssh_type is None
def load_pem_key(
raw: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
raw: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
ssh_type: None = None,
key_type: str | None = None,
password: bytes | None = None,
) -> PublicKeyTypes | PrivateKeyTypes: ...
@overload # if key_type == "public"
def load_pem_key(
raw: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
raw: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
ssh_type: ReadableBuffer | tuple[ReadableBuffer, ...] | None = None,
key_type: Literal["public"] = ...,
password: bytes | None = None,
) -> PublicKeyTypes: ...
@overload # if key_type is not empty, but not "public"
def load_pem_key(
raw: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
raw: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
ssh_type: ReadableBuffer | tuple[ReadableBuffer, ...] | None = None,
key_type: str = ...,
password: bytes | None = None,
) -> PrivateKeyTypes: ...
@overload # if ssh_type is not empty
def load_pem_key(
raw: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
raw: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer,
ssh_type: ReadableBuffer | tuple[ReadableBuffer, ...] = ...,
key_type: str | None = None,
password: bytes | None = None,
Expand Down
8 changes: 4 additions & 4 deletions stubs/Authlib/authlib/jose/rfc7517/asymmetric_key.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Incomplete, ReadableBuffer
from _typeshed import FloatInt, Incomplete, ReadableBuffer
from collections.abc import Iterable
from typing import ClassVar, Literal, SupportsBytes, SupportsIndex
from typing_extensions import Self
Expand Down Expand Up @@ -31,17 +31,17 @@ class AsymmetricKey(Key):
self,
encoding: Literal["PEM", "DER"] | None = None,
is_private: bool = False,
password: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
password: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
): ...
def as_pem(
self,
is_private: bool = False,
password: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
password: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
): ...
def as_der(
self,
is_private: bool = False,
password: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
password: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
): ...
@classmethod
def import_dict_key(cls, raw, options=None) -> Self: ...
Expand Down
11 changes: 9 additions & 2 deletions stubs/Authlib/authlib/jose/rfc7517/jwk.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Incomplete, ReadableBuffer
from _typeshed import FloatInt, Incomplete, ReadableBuffer
from collections.abc import Collection, Iterable, Mapping
from typing import SupportsBytes, SupportsIndex

Expand All @@ -12,7 +12,14 @@ class JsonWebKey:
def import_key(
cls,
raw: (
str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | Mapping[str, object]
str
| bytes
| FloatInt
| Iterable[SupportsIndex]
| SupportsIndex
| SupportsBytes
| ReadableBuffer
| Mapping[str, object]
),
options: Mapping[str, object] | None = None,
) -> Key: ...
Expand Down
4 changes: 2 additions & 2 deletions stubs/Authlib/authlib/jose/rfc7518/jwe_algs.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Incomplete, ReadableBuffer
from _typeshed import FloatInt, Incomplete, ReadableBuffer
from collections.abc import Iterable
from typing import ClassVar, Final, SupportsBytes, SupportsIndex

Expand Down Expand Up @@ -67,7 +67,7 @@ class ECDHESAlgorithm(JWEAlgorithm):
def unwrap(self, enc_alg, ek, headers, key) -> bytes: ...

def u32be_len_input(
s: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer, base64: bool = False
s: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer, base64: bool = False
) -> bytes: ...

JWE_ALG_ALGORITHMS: Final[list[JWEAlgorithm]]
4 changes: 3 additions & 1 deletion stubs/Authlib/authlib/oauth1/rfc5849/util.pyi
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
def escape(s: str | bytes | float) -> str: ...
from _typeshed import FloatInt

def escape(s: str | bytes | FloatInt) -> str: ...
def unescape(s: str | bytes) -> str: ...
4 changes: 2 additions & 2 deletions stubs/Authlib/authlib/oidc/core/grants/util.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import ReadableBuffer
from _typeshed import FloatInt, ReadableBuffer
from collections.abc import Collection, Iterable
from typing import Literal, SupportsBytes, SupportsIndex, overload

Expand All @@ -19,7 +19,7 @@ def generate_id_token(
auth_time: int | None = None,
acr: str | None = None,
amr: list[str] | None = None,
code: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
code: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer | None = None,
kid: str | None = None,
) -> str: ...

Expand Down
4 changes: 2 additions & 2 deletions stubs/Authlib/authlib/oidc/core/util.pyi
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from _typeshed import ReadableBuffer
from _typeshed import FloatInt, ReadableBuffer
from collections.abc import Iterable
from typing import SupportsBytes, SupportsIndex

def create_half_hash(
s: str | bytes | float | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer, alg: str
s: str | bytes | FloatInt | Iterable[SupportsIndex] | SupportsIndex | SupportsBytes | ReadableBuffer, alg: str
) -> bytes | None: ...
6 changes: 3 additions & 3 deletions stubs/Flask-SocketIO/flask_socketio/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Incomplete
from _typeshed import FloatInt, Incomplete
from collections.abc import Callable
from logging import Logger
from threading import Thread
Expand Down Expand Up @@ -35,8 +35,8 @@ class _SocketIOServerOptions(TypedDict, total=False):
@type_check_only
class _EngineIOServerConfig(TypedDict, total=False):
async_mode: Literal["threading", "eventlet", "gevent", "gevent_uwsgi"]
ping_interval: float | tuple[float, float] # seconds
ping_timeout: float # seconds
ping_interval: FloatInt | tuple[FloatInt, FloatInt] # seconds
ping_timeout: FloatInt # seconds
max_http_buffer_size: int
allow_upgrades: bool
http_compression: bool
Expand Down
20 changes: 10 additions & 10 deletions stubs/JACK-Client/jack/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from _typeshed import Unused
from _typeshed import FloatInt, Unused
from collections.abc import Callable, Generator, Iterable, Iterator, Sequence
from typing import Any, Final, Literal, overload, type_check_only
from typing_extensions import Never, Self
Expand All @@ -11,21 +11,21 @@ from _cffi_backend import _CDataBase
# pyright has no error code for subclassing final
@type_check_only
class _JackPositionT(_CDataBase): # type: ignore[misc] # pyright: ignore[reportGeneralTypeIssues] # ty:ignore[subclass-of-final-class] # pyrefly: ignore [invalid-inheritance]
audio_frames_per_video_frame: float
audio_frames_per_video_frame: FloatInt
bar: int
bar_start_tick: float
bar_start_tick: FloatInt
bbt_offset: int
beat: int
beat_type: float
beats_per_bar: float
beats_per_minute: float
beat_type: FloatInt
beats_per_bar: FloatInt
beats_per_minute: FloatInt
frame: int
frame_rate: int
frame_time: float
next_time: float
frame_time: FloatInt
next_time: FloatInt
padding: _CDataBase # <cdata 'int32_t[7]'>
tick: int
ticks_per_beat: float
ticks_per_beat: FloatInt
unique_1: int
unique_2: int
usecs: int
Expand Down Expand Up @@ -153,7 +153,7 @@ class Client:
self, callback: Callable[[Port, str, str], object] | None = None, only_available: bool = True
) -> None: ...
def set_graph_order_callback(self, callback: Callable[[], object]) -> None: ...
def set_xrun_callback(self, callback: Callable[[float], object]) -> None: ...
def set_xrun_callback(self, callback: Callable[[FloatInt], object]) -> None: ...
def set_sync_callback(self, callback: Callable[[int, _JackPositionT], object] | None) -> None: ...
def release_timebase(self) -> None: ...
def set_timebase_callback(
Expand Down
15 changes: 8 additions & 7 deletions stubs/Jetson.GPIO/Jetson/GPIO/gpio.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import FloatInt
from collections.abc import Callable, Sequence
from typing import Literal

Expand Down Expand Up @@ -25,20 +26,20 @@ def add_event_detect(
edge: Literal[31, 32, 33],
callback: Callable[[int], None] | None = ...,
bouncetime: int | None = ...,
polltime: float = 0.2,
polltime: FloatInt = 0.2,
) -> None: ...
def remove_event_detect(channel: int, timeout: float = 0.5) -> None: ...
def remove_event_detect(channel: int, timeout: FloatInt = 0.5) -> None: ...
def event_detected(channel: int) -> bool: ...
def add_event_callback(channel: int, callback: Callable[[int], None]) -> None: ...
def wait_for_edge(
channel: int, edge: Literal[31, 32, 33], bouncetime: int | None = ..., timeout: float | None = ...
channel: int, edge: Literal[31, 32, 33], bouncetime: int | None = ..., timeout: FloatInt | None = ...
) -> int | None: ...
def gpio_function(channel: int) -> Literal[-1, 0, 1]: ...

class PWM:
def __init__(self, channel: int, frequency_hz: float) -> None: ...
def __init__(self, channel: int, frequency_hz: FloatInt) -> None: ...
def __del__(self) -> None: ...
def start(self, duty_cycle_percent: float) -> None: ...
def ChangeFrequency(self, frequency_hz: float) -> None: ...
def ChangeDutyCycle(self, duty_cycle_percent: float) -> None: ...
def start(self, duty_cycle_percent: FloatInt) -> None: ...
def ChangeFrequency(self, frequency_hz: FloatInt) -> None: ...
def ChangeDutyCycle(self, duty_cycle_percent: FloatInt) -> None: ...
def stop(self) -> None: ...
9 changes: 6 additions & 3 deletions stubs/Jetson.GPIO/Jetson/GPIO/gpio_event.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import FloatInt
from collections.abc import Callable
from typing import Any, Final, Literal

Expand All @@ -7,11 +8,13 @@ FALLING_EDGE: Final = 2
BOTH_EDGE: Final = 3

def add_edge_detect(
chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, poll_time: float
chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, poll_time: FloatInt
) -> Literal[1, 2, 0]: ...
def remove_edge_detect(chip_name: str, channel: int, timeout: float = 0.3) -> None: ...
def remove_edge_detect(chip_name: str, channel: int, timeout: FloatInt = 0.3) -> None: ...
def add_edge_callback(chip_name: str, channel: int, callback: Callable[[int], None]) -> None: ...
def edge_event_detected(chip_name: str, channel: int) -> bool: ...
def gpio_event_added(chip_name: str, channel: int) -> Any: ...
def blocking_wait_for_edge(chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, timeout: float) -> int: ...
def blocking_wait_for_edge(
chip_fd: int, chip_name: str, channel: int, request: int, bouncetime: int, timeout: FloatInt
) -> int: ...
def event_cleanup(chip_name: str, channel: int) -> None: ...
3 changes: 2 additions & 1 deletion stubs/Markdown/markdown/core.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import FloatInt
from codecs import _ReadableStream, _WritableStream
from collections.abc import Callable, Mapping, Sequence
from logging import Logger
Expand All @@ -24,7 +25,7 @@ class Markdown:
doc_tag: ClassVar[str]
output_formats: ClassVar[dict[Literal["xhtml", "html"], Callable[[Element], str]]]

last_run: float
last_run: FloatInt
tab_length: int
ESCAPED_CHARS: list[str]
block_level_elements: list[str]
Expand Down
3 changes: 2 additions & 1 deletion stubs/Markdown/markdown/util.pyi
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from _typeshed import FloatInt
from collections.abc import Iterator
from importlib import metadata
from re import Pattern
Expand Down Expand Up @@ -67,5 +68,5 @@ class Registry(Generic[_T]):

def __len__(self) -> int: ...
def get_index_for_name(self, name: str) -> int: ...
def register(self, item: _T, name: str, priority: float) -> None: ...
def register(self, item: _T, name: str, priority: FloatInt) -> None: ...
def deregister(self, name: str, strict: bool = True) -> None: ...
Loading
Loading