from collections.abc import Callable
from datetime import tzinfo
from types import ModuleType
from typing import Any

__all__ = ("Settings", "appstr", "bugreport", "filter_hidden_settings", "find_app")

from celery.app.base import Celery
from celery.utils.collections import ConfigurationView

def appstr(app: Celery) -> str: ...
def bugreport(app: Celery) -> str: ...
def filter_hidden_settings(conf: dict[str, Any]) -> dict[str, Any]: ...
def find_app(
    app: str,
    symbol_by_name: Callable[[str], Any] = ...,
    imp: Callable[[str], ModuleType] | None = ...,
) -> Celery: ...

class Settings(ConfigurationView):
    def __init__(
        self, *args: Any, deprecated_settings: set[str] | None = None, **kwargs: Any
    ) -> None: ...
    @property
    def broker_read_url(self) -> str: ...
    @property
    def broker_url(self) -> str: ...
    @property
    def broker_write_url(self) -> str: ...
    @property
    def result_backend(self) -> str: ...
    @property
    def task_default_exchange(self) -> str: ...
    @property
    def task_default_routing_key(self) -> str: ...
    @property
    def timezone(self) -> tzinfo: ...
    def finalize(self) -> None: ...
    def find_option(self, name: str, namespace: str = "") -> tuple[str, Any]: ...
    def find_value_for_key(self, name: str, namespace: str = "celery") -> Any: ...
    def get_by_parts(self, *parts: str) -> Any: ...
    def humanize(
        self, with_defaults: bool = False, censored: bool = True
    ) -> dict[str, Any]: ...
    def maybe_warn_deprecated_settings(self) -> None: ...
    def table(
        self, with_defaults: bool = False, censored: bool = True
    ) -> dict[str, Any]: ...
    def value_set_for(self, key: str) -> bool: ...
    def without_defaults(self) -> dict[str, Any]: ...
