You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm testing out the new API. It seems that Jobs.load() returns a dict[int, Job] whose keys are the job IDs. However this isn't explained in the docs. This is a change from the previous API which returned some kind of list-type iterable (I forget what).
The text was updated successfully, but these errors were encountered:
the Jobs class basically inherits from dict, and Jobs.load() returns a new instance of a Jobs collection that contains all the jobs in the system at the moment of calling.
The documentation only says that the Jobs class inherits from dict (Bases: dict at the top) and contains Job objects, so I agree that it might not be entirely clear that the keys of this dict are the job ids.
I will try to make it more clear in the docs that the Jobs collection inherits from dict and basically has the form of dict[int, Job], where the keys are the job-ids. Would that be good?
Okay that's a fair point, there is technically the right information there already. I think it's hindered by the fact that my IDE has no idea what fields these classes have. But the information you mention would be a good addition.
I'm testing out the new API. It seems that
Jobs.load()
returns adict[int, Job]
whose keys are the job IDs. However this isn't explained in the docs. This is a change from the previous API which returned some kind of list-type iterable (I forget what).The text was updated successfully, but these errors were encountered: