-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Here _preferred_backends is Dict[str, str] of file extensions to backend IDs from preferred_backends traitlet, so self._preferred_backends.get(ext) returns a preferred backend ID (str). Only _backends stores BackendInstances in Dict[str, BackendInstance].
To improve clarity updated var naming in the function to mention ids, Updated helped text for preferred_backends and legacy_job_backend traitlets clearly explaining that they expect backend ids.
Looking at recent traitlets docs it seems we could add typing https://traitlets.readthedocs.io/en/stable/using_traitlets.html#default-values-and-checking-type-and-value. Adding typing to all traitlets as currently we have none would be a good follow-up.
Originally posted by @andrii-i in #596 (comment)