from celery.app.task import Context as Context, Task as BaseTask
from typing import Any, Optional

class _CompatShared:
    name: Any = ...
    cons: Any = ...
    def __init__(self, name: Any, cons: Any) -> None: ...
    def __hash__(self) -> Any: ...
    def __call__(self, app: Any): ...

class TaskType(type):
    def __new__(cls, name: Any, bases: Any, attrs: Any): ...

class Task(BaseTask):
    abstract: bool = ...
    __bound__: bool = ...
    __v2_compat__: bool = ...
    queue: Any = ...
    routing_key: Any = ...
    exchange: Any = ...
    exchange_type: Any = ...
    delivery_mode: Any = ...
    mandatory: bool = ...
    immediate: bool = ...
    priority: Any = ...
    type: str = ...
    from_config: Any = ...
    def request(self): ...
    @backend.setter
    def backend(cls, value: Any) -> None: ...
    @classmethod
    def get_logger(cls, **kwargs: Any): ...
    @classmethod
    def establish_connection(cls): ...
    def get_publisher(self, connection: Optional[Any] = ..., exchange: Optional[Any] = ..., exchange_type: Optional[Any] = ..., **options: Any): ...
    @classmethod
    def get_consumer(cls, connection: Optional[Any] = ..., queues: Optional[Any] = ..., **kwargs: Any): ...

class PeriodicTask(Task):
    abstract: bool = ...
    ignore_result: bool = ...
    relative: bool = ...
    options: Any = ...
    compat: bool = ...
    run_every: Any = ...
    def __init__(self) -> None: ...
    @classmethod
    def on_bound(cls, app: Any) -> None: ...

def task(*args: Any, **kwargs: Any): ...
