from _typeshed import Incomplete
from collections.abc import Callable
from contextlib import AbstractContextManager
from typing import ClassVar, ParamSpec

_P = ParamSpec("_P")

class Context:
    LAYER_NAMES: ClassVar[list[str]]
    FAIL_ON_CLEANUP_ERRORS: ClassVar[bool]

    feature: Incomplete | None
    scenario: Incomplete
    tags: set[str]
    aborted: bool
    failed: bool
    table: Incomplete | None
    text: str | None
    config: Incomplete
    active_outline: Incomplete
    fail_on_cleanup_errors: bool

    def __init__(self, runner) -> None: ...
    def __getattr__(self, name: str) -> Incomplete: ...
    def __setattr__(self, name: str, value) -> None: ...
    def __delattr__(self, name: str) -> None: ...
    def __contains__(self, name: str) -> bool: ...
    def abort(self, reason: str | None = None) -> None: ...
    def use_or_assign_param(self, name: str, value): ...
    def use_or_create_param(self, name: str, factory_func: Callable[_P, Incomplete], *args: _P.args, **kwargs: _P.kwargs): ...
    def use_with_user_mode(self) -> AbstractContextManager[None]: ...
    def execute_steps(self, steps_text: str) -> bool: ...
    def add_cleanup(self, cleanup_func: Callable[_P, Incomplete], *args: _P.args, **kwargs: _P.kwargs) -> None: ...
    @property
    def captured(self): ...
    def attach(self, mime_type: str, data: bytes) -> None: ...

def __getattr__(name: str) -> Incomplete: ...
