Skip to content
Merged
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
5 changes: 4 additions & 1 deletion scheduler/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def conf_settings():
return
if not isinstance(user_settings, dict):
raise ImproperlyConfigured("SCHEDULER_CONFIG should be a SchedulerConfiguration or dict")
annotations = get_annotations(SCHEDULER_CONFIG)

# Use `type(obj)` because Python 3.14+ `annotationlib.get_annotations()` works only on classes/functions/modules.
# It reads __annotations__ or __annotate__; instances without annotations will fail.
annotations = get_annotations(type(SCHEDULER_CONFIG))
for k, v in user_settings.items():
if k not in annotations:
raise ImproperlyConfigured(f"Unknown setting {k} in SCHEDULER_CONFIG")
Expand Down
Loading