Remove pluggy stubs (#11351)

This commit is contained in:
Nikita Sobolev
2024-02-01 00:30:20 +03:00
committed by GitHub
parent 284afde9cc
commit 547cbc748f
7 changed files with 0 additions and 224 deletions

View File

@@ -1 +0,0 @@
pluggy._hooks._HookRelay.__getattr__ # is not present at runtime

View File

@@ -1,3 +0,0 @@
version = "1.2.0"
upstream_repository = "https://github.com/pytest-dev/pluggy"
obsolete_since = "1.3.0" # Released on 2023-08-26

View File

@@ -1,5 +0,0 @@
from ._hooks import HookimplMarker as HookimplMarker, HookspecMarker as HookspecMarker
from ._manager import PluginManager as PluginManager, PluginValidationError as PluginValidationError
from ._result import HookCallError as HookCallError
__version__: str

View File

@@ -1,116 +0,0 @@
from collections.abc import Callable, Generator, Mapping, Sequence
from types import ModuleType
from typing import Any, TypedDict, TypeVar, overload
from typing_extensions import TypeAlias
from ._result import _Result
_T = TypeVar("_T")
_F = TypeVar("_F", bound=Callable[..., object])
_Namespace: TypeAlias = ModuleType | type
_Plugin: TypeAlias = object
_HookExec: TypeAlias = Callable[[str, Sequence[HookImpl], Mapping[str, object], bool], object | list[object]]
_HookImplFunction: TypeAlias = Callable[..., _T | Generator[None, _Result[_T], None]]
class _HookSpecOpts(TypedDict):
firstresult: bool
historic: bool
warn_on_impl: Warning | None
class _HookImplOpts(TypedDict):
wrapper: bool
hookwrapper: bool
optionalhook: bool
tryfirst: bool
trylast: bool
specname: str | None
class HookspecMarker:
project_name: str
def __init__(self, project_name: str) -> None: ...
@overload
def __call__(
self, function: _F, firstresult: bool = False, historic: bool = False, warn_on_impl: Warning | None = None
) -> _F: ...
@overload
def __call__(
self, function: None = None, firstresult: bool = False, historic: bool = False, warn_on_impl: Warning | None = None
) -> Callable[[_F], _F]: ...
class HookimplMarker:
project_name: str
def __init__(self, project_name: str) -> None: ...
@overload
def __call__(
self,
function: _F,
hookwrapper: bool = False,
optionalhook: bool = False,
tryfirst: bool = False,
trylast: bool = False,
specname: str | None = None,
wrapper: bool = False,
) -> _F: ...
@overload
def __call__(
self,
function: None = None,
hookwrapper: bool = False,
optionalhook: bool = False,
tryfirst: bool = False,
trylast: bool = False,
specname: str | None = None,
wrapper: bool = False,
) -> Callable[[_F], _F]: ...
def normalize_hookimpl_opts(opts: _HookImplOpts) -> None: ...
def varnames(func: object) -> tuple[tuple[str, ...], tuple[str, ...]]: ...
class _HookRelay:
def __getattr__(self, name: str) -> _HookCaller: ...
class _HookCaller:
name: str
spec: HookSpec | None
def __init__(
self,
name: str,
hook_execute: _HookExec,
specmodule_or_class: _Namespace | None = None,
spec_opts: _HookSpecOpts | None = None,
) -> None: ...
def has_spec(self) -> bool: ...
def set_specification(self, specmodule_or_class: _Namespace, spec_opts: _HookSpecOpts) -> None: ...
def is_historic(self) -> bool: ...
def get_hookimpls(self) -> list[HookImpl]: ...
def __call__(self, **kwargs: object) -> Any: ...
def call_historic(
self, result_callback: Callable[[Any], None] | None = None, kwargs: Mapping[str, object] | None = None
) -> None: ...
def call_extra(self, methods: Sequence[Callable[..., object]], kwargs: Mapping[str, object]) -> Any: ...
class HookImpl:
function: _HookImplFunction[object]
plugin: _Plugin
opts: _HookImplOpts
plugin_name: str
wrapper: bool
hookwrapper: bool
optionalhook: bool
tryfirst: bool
trylast: bool
argnames: tuple[str, ...]
kwargnames: tuple[str, ...]
def __init__(
self, plugin: _Plugin, plugin_name: str, function: _HookImplFunction[object], hook_impl_opts: _HookImplOpts
) -> None: ...
class HookSpec:
namespace: _Namespace
function: Callable[..., object]
name: str
opts: _HookSpecOpts
warn_on_impl: Warning | None
argnames: tuple[str, ...]
kwargnames: tuple[str, ...]
def __init__(self, namespace: _Namespace, name: str, opts: _HookSpecOpts) -> None: ...

View File

@@ -1,60 +0,0 @@
from _typeshed import Incomplete
from collections.abc import Callable, Iterable, Mapping, Sequence
from importlib.metadata import Distribution
from typing import Any
from typing_extensions import TypeAlias
from ._hooks import (
HookImpl as HookImpl,
HookSpec as HookSpec,
_HookCaller,
_HookImplOpts,
_HookRelay,
_HookSpecOpts,
_Namespace,
_Plugin,
normalize_hookimpl_opts as normalize_hookimpl_opts,
)
from ._result import _Result as _Result
from ._tracing import TagTracerSub
_BeforeTrace: TypeAlias = Callable[[str, Sequence[HookImpl], Mapping[str, Any]], None]
_AfterTrace: TypeAlias = Callable[[_Result[Any], str, Sequence[HookImpl], Mapping[str, Any]], None]
class PluginValidationError(Exception):
plugin: _Plugin
def __init__(self, plugin: _Plugin, message: str) -> None: ...
class DistFacade:
def __init__(self, dist: Distribution) -> None: ...
@property
def project_name(self) -> str: ...
def __getattr__(self, attr: str, default: Incomplete | None = None) -> Any: ...
def __dir__(self) -> list[str]: ...
class PluginManager:
project_name: str
trace: TagTracerSub
hook: _HookRelay
def __init__(self, project_name: str) -> None: ...
def register(self, plugin: _Plugin, name: str | None = None) -> str | None: ...
def parse_hookimpl_opts(self, plugin: _Plugin, name: str) -> _HookImplOpts | None: ...
def unregister(self, plugin: _Plugin | None = None, name: str | None = None) -> _Plugin: ...
def set_blocked(self, name: str) -> None: ...
def is_blocked(self, name: str) -> bool: ...
def add_hookspecs(self, module_or_class: _Namespace) -> None: ...
def parse_hookspec_opts(self, module_or_class: _Namespace, name: str) -> _HookSpecOpts | None: ...
def get_plugins(self) -> set[Any]: ...
def is_registered(self, plugin: _Plugin) -> bool: ...
def get_canonical_name(self, plugin: _Plugin) -> str: ...
def get_plugin(self, name: str) -> Any | None: ...
def has_plugin(self, name: str) -> bool: ...
def get_name(self, plugin: _Plugin) -> str | None: ...
def check_pending(self) -> None: ...
def load_setuptools_entrypoints(self, group: str, name: str | None = None) -> int: ...
def list_plugin_distinfo(self) -> list[tuple[_Plugin, DistFacade]]: ...
def list_name_plugin(self) -> list[tuple[str, _Plugin]]: ...
def get_hookcallers(self, plugin: _Plugin) -> list[_HookCaller] | None: ...
def add_hookcall_monitoring(self, before: _BeforeTrace, after: _AfterTrace) -> Callable[[], None]: ...
def enable_tracing(self) -> Callable[[], None]: ...
def subset_hook_caller(self, name: str, remove_plugins: Iterable[_Plugin]) -> _HookCaller: ...

View File

@@ -1,19 +0,0 @@
from _typeshed import ExcInfo
from collections.abc import Callable
from typing import Generic, TypeVar
_T = TypeVar("_T")
class HookCallError(Exception): ...
class _Result(Generic[_T]):
def __init__(self, result: _T | None, exception: BaseException | None) -> None: ...
@property
def excinfo(self) -> ExcInfo | None: ...
@property
def exception(self) -> BaseException | None: ...
@classmethod
def from_call(cls, func: Callable[[], _T]) -> _Result[_T]: ...
def force_result(self, result: _T) -> None: ...
def force_exception(self, exception: BaseException) -> None: ...
def get_result(self) -> _T: ...

View File

@@ -1,20 +0,0 @@
from collections.abc import Callable
from typing import Any
from typing_extensions import TypeAlias
_Writer: TypeAlias = Callable[[str], object]
_Processor: TypeAlias = Callable[[tuple[str, ...], tuple[Any, ...]], None]
class TagTracer:
indent: int
def __init__(self) -> None: ...
def get(self, name: str) -> TagTracerSub: ...
def setwriter(self, writer: _Writer | None) -> None: ...
def setprocessor(self, tags: str | tuple[str, ...], processor: _Processor) -> None: ...
class TagTracerSub:
root: TagTracer
tags: tuple[str, ...]
def __init__(self, root: TagTracer, tags: tuple[str, ...]) -> None: ...
def __call__(self, *args: object) -> None: ...
def get(self, name: str) -> TagTracerSub: ...