From 2fa145b9a44821878914e0e6277f7e05f5ddc7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Gr=C3=B6nholm?= Date: Tue, 19 Sep 2023 01:06:36 +0300 Subject: [PATCH] Replaced top-level `__all__` with the re-export syntax --- src/apscheduler/__init__.py | 120 ++++++++++++------------------------ 1 file changed, 41 insertions(+), 79 deletions(-) diff --git a/src/apscheduler/__init__.py b/src/apscheduler/__init__.py index ddf34d96f..36b090ec1 100644 --- a/src/apscheduler/__init__.py +++ b/src/apscheduler/__init__.py @@ -1,86 +1,48 @@ from __future__ import annotations -__all__ = [ - "CoalescePolicy", - "ConflictPolicy", - "ConflictingIdError", - "DataStoreEvent", - "DeserializationError", - "Event", - "Job", - "JobAcquired", - "JobAdded", - "JobCancelled", - "JobDeadlineMissed", - "JobDeserializationFailed", - "JobInfo", - "JobLookupError", - "JobOutcome", - "JobReleased", - "JobRemoved", - "JobResult", - "JobResultNotReady", - "MaxIterationsReached", - "RetrySettings", - "RunState", - "Schedule", - "ScheduleLookupError", - "SerializationError", - "ScheduleAdded", - "ScheduleUpdated", - "ScheduleRemoved", - "ScheduleDeserializationFailed", - "SchedulerEvent", - "SchedulerRole", - "SchedulerStarted", - "SchedulerStopped", - "Task", - "TaskAdded", - "TaskLookupError", - "TaskUpdated", - "TaskRemoved", - "current_async_scheduler", - "current_scheduler", - "current_job", -] - from typing import Any -from ._context import current_async_scheduler, current_job, current_scheduler -from ._enums import CoalescePolicy, ConflictPolicy, JobOutcome, RunState, SchedulerRole -from ._events import ( - DataStoreEvent, - Event, - JobAcquired, - JobAdded, - JobDeserializationFailed, - JobReleased, - JobRemoved, - ScheduleAdded, - ScheduleDeserializationFailed, - ScheduleRemoved, - SchedulerEvent, - SchedulerStarted, - SchedulerStopped, - ScheduleUpdated, - TaskAdded, - TaskRemoved, - TaskUpdated, -) -from ._exceptions import ( - ConflictingIdError, - DeserializationError, - JobCancelled, - JobDeadlineMissed, - JobLookupError, - JobResultNotReady, - MaxIterationsReached, - ScheduleLookupError, - SerializationError, - TaskLookupError, -) -from ._retry import RetrySettings -from ._structures import Job, JobInfo, JobResult, Schedule, Task +from ._context import current_async_scheduler as current_async_scheduler +from ._context import current_job as current_job +from ._context import current_scheduler as current_scheduler +from ._enums import CoalescePolicy as CoalescePolicy +from ._enums import ConflictPolicy as ConflictPolicy +from ._enums import JobOutcome as JobOutcome +from ._enums import RunState as RunState +from ._enums import SchedulerRole as SchedulerRole +from ._events import DataStoreEvent as DataStoreEvent +from ._events import Event as Event +from ._events import JobAcquired as JobAcquired +from ._events import JobAdded as JobAdded +from ._events import JobDeserializationFailed as JobDeserializationFailed +from ._events import JobReleased as JobReleased +from ._events import JobRemoved as JobRemoved +from ._events import ScheduleAdded as ScheduleAdded +from ._events import ScheduleDeserializationFailed as ScheduleDeserializationFailed +from ._events import ScheduleRemoved as ScheduleRemoved +from ._events import SchedulerEvent as SchedulerEvent +from ._events import SchedulerStarted as SchedulerStarted +from ._events import SchedulerStopped as SchedulerStopped +from ._events import ScheduleUpdated as ScheduleUpdated +from ._events import TaskAdded as TaskAdded +from ._events import TaskRemoved as TaskRemoved +from ._events import TaskUpdated as TaskUpdated +from ._exceptions import ConflictingIdError as ConflictingIdError +from ._exceptions import DeserializationError as DeserializationError +from ._exceptions import JobCancelled as JobCancelled +from ._exceptions import JobDeadlineMissed as JobDeadlineMissed +from ._exceptions import JobLookupError as JobLookupError +from ._exceptions import JobResultNotReady as JobResultNotReady +from ._exceptions import MaxIterationsReached as MaxIterationsReached +from ._exceptions import ScheduleLookupError as ScheduleLookupError +from ._exceptions import SerializationError as SerializationError +from ._exceptions import TaskLookupError as TaskLookupError +from ._retry import RetrySettings as RetrySettings +from ._structures import Job as Job +from ._structures import JobInfo as JobInfo +from ._structures import JobResult as JobResult +from ._structures import Schedule as Schedule +from ._structures import Task as Task # Re-export imports, so they look like they live directly in this package value: Any