Skip to content

Commit 7c2b277

Browse files
committed
fix: use Incomplete instead of Any
1 parent 33ea86a commit 7c2b277

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

stubs/behave/behave/runner.pyi

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1+
from _typeshed import Incomplete
12
from collections.abc import Callable
23
from contextlib import AbstractContextManager
3-
from typing import Any, ParamSpec
4+
from typing import ParamSpec
45

56
_P = ParamSpec("_P")
67

78
class Context:
89
LAYER_NAMES: list[str]
910
FAIL_ON_CLEANUP_ERRORS: bool
1011

11-
feature: Any
12-
scenario: Any
12+
feature: Incomplete
13+
scenario: Incomplete
1314
tags: set[str]
1415
aborted: bool
1516
failed: bool
16-
table: Any
17+
table: Incomplete
1718
text: str | None
18-
config: Any
19-
active_outline: Any
19+
config: Incomplete
20+
active_outline: Incomplete
2021

21-
def __init__(self, runner: Any) -> None: ...
22-
def __getattr__(self, name: str) -> Any: ...
23-
def __setattr__(self, name: str, value: Any) -> None: ...
22+
def __init__(self, runner) -> None: ...
23+
def __getattr__(self, name: str) -> Incomplete: ...
24+
def __setattr__(self, name: str, value) -> None: ...
2425
def __delattr__(self, name: str) -> None: ...
2526
def __contains__(self, name: str) -> bool: ...
2627
def abort(self, reason: str | None = None) -> None: ...
27-
def use_or_assign_param(self, name: str, value: Any) -> Any: ...
28-
def use_or_create_param(self, name: str, factory_func: Callable[_P, Any], *args: _P.args, **kwargs: _P.kwargs) -> Any: ...
28+
def use_or_assign_param(self, name: str, value): ...
29+
def use_or_create_param(self, name: str, factory_func: Callable[_P, Incomplete], *args: _P.args, **kwargs: _P.kwargs): ...
2930
def use_with_user_mode(self) -> AbstractContextManager[None]: ...
3031
def execute_steps(self, steps_text: str) -> bool: ...
31-
def add_cleanup(self, cleanup_func: Callable[_P, Any], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
32+
def add_cleanup(self, cleanup_func: Callable[_P, Incomplete], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
3233
@property
33-
def captured(self) -> Any: ...
34+
def captured(self): ...
3435
def attach(self, mime_type: str, data: bytes) -> None: ...

0 commit comments

Comments
 (0)