mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Annotate unittest.TestCase.__init_subclass__ (#13602)
This commit is contained in:
@@ -164,8 +164,6 @@ builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
unittest.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
unittest.case.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
|
||||
|
||||
# ===============================================================
|
||||
|
||||
@@ -145,8 +145,6 @@ builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
unittest.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
unittest.case.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
|
||||
|
||||
# ===============================================================
|
||||
|
||||
@@ -157,8 +157,6 @@ builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
unittest.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
unittest.case.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
|
||||
|
||||
# ===============================================================
|
||||
|
||||
@@ -147,5 +147,3 @@ builtins.property.__set_name__ # Doesn't actually exist
|
||||
collections\.UserList\.index # ignoring pos-or-keyword parameter
|
||||
dataclasses.KW_ONLY # white lies around defaults
|
||||
importlib.metadata._meta.SimplePath.joinpath # Runtime definition of protocol is incorrect
|
||||
unittest.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
unittest.case.TestCase.__init_subclass__ # Runtime has *args, **kwargs, but will error if any are supplied
|
||||
|
||||
@@ -20,7 +20,7 @@ from typing import (
|
||||
TypeVar,
|
||||
overload,
|
||||
)
|
||||
from typing_extensions import ParamSpec, Self, TypeAlias
|
||||
from typing_extensions import Never, ParamSpec, Self, TypeAlias
|
||||
from warnings import WarningMessage
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
@@ -323,6 +323,10 @@ class TestCase:
|
||||
self, subset: Mapping[Any, Any], dictionary: Mapping[Any, Any], msg: object = None
|
||||
) -> None: ...
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
# Runtime has *args, **kwargs, but will error if any are supplied
|
||||
def __init_subclass__(cls, *args: Never, **kwargs: Never) -> None: ...
|
||||
|
||||
class FunctionTestCase(TestCase):
|
||||
def __init__(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user