Skip to content

Commit c54e18e

Browse files
authored
Merge branch 'main' into renovate/pytype-and-pyright
2 parents 00437ef + 38aa66a commit c54e18e

7 files changed

Lines changed: 145 additions & 102 deletions

File tree

stdlib/warnings.pyi

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import sys
33
from _warnings import warn as warn, warn_explicit as warn_explicit
44
from collections.abc import Sequence
55
from types import ModuleType, TracebackType
6-
from typing import Any, Generic, Literal, TextIO, TypeVar, overload
7-
from typing_extensions import LiteralString, TypeAlias
6+
from typing import Any, Generic, Literal, TextIO, overload
7+
from typing_extensions import LiteralString, TypeAlias, TypeVar
88

99
__all__ = [
1010
"warn",
@@ -21,7 +21,8 @@ if sys.version_info >= (3, 13):
2121
__all__ += ["deprecated"]
2222

2323
_T = TypeVar("_T")
24-
_W = TypeVar("_W", bound=list[WarningMessage] | None)
24+
_W_co = TypeVar("_W_co", bound=list[WarningMessage] | None, default=list[WarningMessage] | None, covariant=True)
25+
2526
if sys.version_info >= (3, 14):
2627
_ActionKind: TypeAlias = Literal["default", "error", "ignore", "always", "module", "once"]
2728
else:
@@ -66,7 +67,7 @@ class WarningMessage:
6667
source: Any | None = None,
6768
) -> None: ...
6869

69-
class catch_warnings(Generic[_W]):
70+
class catch_warnings(Generic[_W_co]):
7071
if sys.version_info >= (3, 11):
7172
@overload
7273
def __init__(
@@ -92,7 +93,7 @@ class catch_warnings(Generic[_W]):
9293
) -> None: ...
9394
@overload
9495
def __init__(
95-
self: catch_warnings[list[WarningMessage] | None],
96+
self,
9697
*,
9798
record: bool,
9899
module: ModuleType | None = None,
@@ -109,11 +110,9 @@ class catch_warnings(Generic[_W]):
109110
self: catch_warnings[list[WarningMessage]], *, record: Literal[True], module: ModuleType | None = None
110111
) -> None: ...
111112
@overload
112-
def __init__(
113-
self: catch_warnings[list[WarningMessage] | None], *, record: bool, module: ModuleType | None = None
114-
) -> None: ...
113+
def __init__(self, *, record: bool, module: ModuleType | None = None) -> None: ...
115114

116-
def __enter__(self) -> _W: ...
115+
def __enter__(self) -> _W_co: ...
117116
def __exit__(
118117
self, exc_type: type[BaseException] | None, exc_val: BaseException | None, exc_tb: TracebackType | None
119118
) -> None: ...

stubs/Flask-SocketIO/flask_socketio/test_client.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class SocketIOTestClient:
2929
auth: dict[str, Incomplete] | None = None,
3030
) -> None: ...
3131
def disconnect(self, namespace: str | None = None) -> None: ...
32-
def emit(self, event: str, *args, callback: bool = True, namespace: str | None = None) -> Incomplete | None: ...
32+
def emit(self, event: str, *args, callback: bool = False, namespace: str | None = None) -> Incomplete | None: ...
3333
def send(
3434
self,
3535
data: str | dict[str, Incomplete] | list[Incomplete],

stubs/gdb/gdb/__init__.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ from typing_extensions import TypeAlias, deprecated
1212

1313
import gdb.FrameDecorator
1414
import gdb.types
15-
import gdb.xmethod
1615

1716
# The following submodules are automatically imported
1817
from . import events as events, printing as printing, prompt as prompt, types as types

stubs/icalendar/@tests/stubtest_allowlist.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,12 @@ icalendar.cal.Component.set_inline
1212

1313
# Stubtest gets confused by multiple inheritance.
1414
icalendar.prop.vSkip.__new__
15+
16+
# Stubtest incorrectly reports that stub argument "cls" should be
17+
# positional or keyword.
18+
icalendar.vBoolean.__new__
19+
icalendar.vFloat.__new__
20+
icalendar.vInt.__new__
21+
icalendar.prop.vBoolean.__new__
22+
icalendar.prop.vFloat.__new__
23+
icalendar.prop.vInt.__new__

stubs/icalendar/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "6.1.*"
1+
version = "~= 6.1.2"
22
upstream_repository = "https://github.com/collective/icalendar"
33
requires = ["types-python-dateutil", "types-pytz"]
44

0 commit comments

Comments
 (0)