Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions celery-stubs/app/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ def shared_task(
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: None = ...,
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -112,8 +112,8 @@ def shared_task(
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: None = ...,
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -149,8 +149,8 @@ def shared_task(
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: type[_T],
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -198,8 +198,8 @@ def shared_task(
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: type[_T],
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down
8 changes: 4 additions & 4 deletions celery-stubs/app/amqp.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class AMQP:
callbacks: list[Any] | None = None,
errbacks: list[Any] | None = None,
reply_to: str | None = None,
time_limit: int | None = None,
soft_time_limit: int | None = None,
time_limit: float | None = None,
soft_time_limit: float | None = None,
create_sent_event: bool = False,
root_id: str | None = None,
parent_id: str | None = None,
Expand All @@ -119,8 +119,8 @@ class AMQP:
callbacks: list[Any] | None = None,
errbacks: list[Any] | None = None,
reply_to: str | None = None,
time_limit: int | None = None,
soft_time_limit: int | None = None,
time_limit: float | None = None,
soft_time_limit: float | None = None,
create_sent_event: bool = False,
root_id: str | None = None,
parent_id: str | None = None,
Expand Down
49 changes: 29 additions & 20 deletions celery-stubs/app/base.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,17 @@ class Celery(Generic[_T_Global]):
broker_channel_error_retry: bool = ...,
broker_login_method: str = ...,
broker_transport_options: dict[str, Any] = ...,
broker_connection_retry_on_startup: bool = ...,
broker_connection_timeout: float = ...,
broker_connection_retry_on_startup: bool | None = ...,
broker_connection_timeout: float | None = ...,
broker_heartbeat: int = ...,
broker_pool_limit: int | None = ...,
result_backend: str | None = ...,
result_backend_transport_options: dict[str, Any] | None = ...,
result_extended: bool = ...,
result_expires: datetime.timedelta = ...,
result_expires: datetime.timedelta | float | None = ...,
accept_content: list[str] = ...,
enable_utc: bool = ...,
timezone: str | None = ...,
beat_schedule: dict[str, Any] | None = ...,
task_queues: list[kombu.Queue] | None = ...,
task_default_queue: str = ...,
Expand All @@ -121,23 +127,26 @@ class Celery(Generic[_T_Global]):
task_default_routing_key: str = ...,
task_default_delivery_mode: str = ...,
task_create_missing_queues: bool = ...,
task_always_eager: bool = ...,
task_eager_propagates: bool = ...,
task_routes: dict[Any, Any] | Sequence[Any] = ...,
task_acks_late: bool = ...,
task_time_limit: int = ...,
task_soft_time_limit: int = ...,
task_time_limit: float | None = ...,
task_soft_time_limit: float | None = ...,
task_track_started: bool = ...,
task_serializer: str = ...,
worker_prefetch_multiplier: int = ...,
worker_max_tasks_per_child: int = ...,
worker_concurrency: int = ...,
worker_max_memory_per_child: int = ...,
worker_max_tasks_per_child: int | None = ...,
worker_concurrency: int | None = ...,
worker_max_memory_per_child: int | None = ...,
worker_disable_rate_limits: bool = ...,
worker_cancel_long_running_tasks_on_connection_loss: bool = ...,
worker_hijack_root_logger: bool = ...,
worker_log_format: str = ...,
worker_task_log_format: str = ...,
worker_redirect_stdouts: bool = ...,
worker_redirect_stdouts_level: str = ...,
event_queue_expires: float = ...,
**kwargs: Any,
) -> None: ...
def _task_from_fun(
Expand Down Expand Up @@ -169,8 +178,8 @@ class Celery(Generic[_T_Global]):
send_events: bool = ...,
store_errors_even_if_ignored: bool = ...,
serializer: str = ...,
time_limit: int | None = ...,
soft_time_limit: int | None = ...,
time_limit: float | None = ...,
soft_time_limit: float | None = ...,
autoregister: bool = ...,
track_started: bool = ...,
acks_late: bool = ...,
Expand Down Expand Up @@ -207,8 +216,8 @@ class Celery(Generic[_T_Global]):
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: type[_T],
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -247,8 +256,8 @@ class Celery(Generic[_T_Global]):
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: None = ...,
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -287,8 +296,8 @@ class Celery(Generic[_T_Global]):
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: None = ...,
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -327,8 +336,8 @@ class Celery(Generic[_T_Global]):
default_retry_delay: int = ...,
acks_late: bool = ...,
ignore_result: bool = ...,
soft_time_limit: int = ...,
time_limit: int = ...,
soft_time_limit: float | None = ...,
time_limit: float | None = ...,
base: type[_T],
retry_kwargs: dict[str, Any] = ...,
retry_backoff: bool | int = ...,
Expand Down Expand Up @@ -422,8 +431,8 @@ class Celery(Generic[_T_Global]):
retries: int = 0,
chord: chord | None = None,
reply_to: str | None = None,
time_limit: int | None = None,
soft_time_limit: int | None = None,
time_limit: float | None = None,
soft_time_limit: float | None = None,
root_id: str | None = None,
parent_id: str | None = None,
route_name: str | None = None,
Expand Down
12 changes: 6 additions & 6 deletions celery-stubs/app/task.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ class Task(Generic[_P, _R_co]):
send_events: bool
store_errors_even_if_ignored: bool
serializer: str
time_limit: int | None
soft_time_limit: int | None
time_limit: float | None
soft_time_limit: float | None
autoregister: bool
track_started: bool
acks_late: bool # None at class level, resolved from config on instances
Expand Down Expand Up @@ -158,8 +158,8 @@ class Task(Generic[_P, _R_co]):
publisher: kombu.Producer = ...,
headers: dict[str, str] = ...,
ignore_result: bool = ...,
time_limit: int = ...,
soft_time_limit: int = ...,
time_limit: float | None = ...,
soft_time_limit: float | None = ...,
) -> celery.result.AsyncResult[_R_co]: ...
def shadow_name(
self, args: tuple[Any, ...], kwargs: dict[str, Any], options: dict[str, Any]
Expand Down Expand Up @@ -202,8 +202,8 @@ class Task(Generic[_P, _R_co]):
publisher: kombu.Producer = ...,
headers: dict[str, str] = ...,
ignore_result: bool = ...,
time_limit: int = ...,
soft_time_limit: int = ...,
time_limit: float | None = ...,
soft_time_limit: float | None = ...,
) -> Retry: ...
def apply(
self,
Expand Down
14 changes: 6 additions & 8 deletions celery-stubs/app/utils.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class Settings(ConfigurationView):
self, *args: Any, deprecated_settings: set[str] | None = None, **kwargs: Any
) -> None: ...
@property
def broker_read_url(self) -> str: ...
def broker_read_url(self) -> str | None: ...
@property
def broker_url(self) -> str: ...
def broker_url(self) -> str | None: ...
@property
def broker_write_url(self) -> str: ...
def broker_write_url(self) -> str | None: ...
@property
def result_backend(self) -> str: ...
def result_backend(self) -> str | None: ...
@property
def task_default_exchange(self) -> str: ...
@property
Expand All @@ -39,12 +39,10 @@ class Settings(ConfigurationView):
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 humanize(self, with_defaults: bool = False, censored: bool = True) -> str: ...
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]: ...
def without_defaults(self) -> Settings: ...
4 changes: 2 additions & 2 deletions celery-stubs/contrib/django/task.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ class DjangoTask(Task[_P, _R_co]):
publisher: kombu.Producer = ...,
headers: dict[str, str] = ...,
ignore_result: bool = ...,
time_limit: int = ...,
soft_time_limit: int = ...,
time_limit: float | None = ...,
soft_time_limit: float | None = ...,
) -> celery.result.AsyncResult[_R_co]: ...
Loading