2929from databento .common import API_VERSION
3030from databento .common .constants import HTTP_STREAMING_READ_SIZE
3131from databento .common .enums import Delivery
32+ from databento .common .enums import JobState
3233from databento .common .enums import SplitDuration
3334from databento .common .error import BentoError
3435from databento .common .error import BentoHttpError
3738from databento .common .http import check_http_error
3839from databento .common .parsing import datetime_to_string
3940from databento .common .parsing import optional_datetime_to_string
40- from databento .common .parsing import optional_values_list_to_string
41+ from databento .common .parsing import optional_states_list_to_string
4142from databento .common .parsing import symbols_list_to_list
4243from databento .common .publishers import Dataset
4344from databento .common .validation import validate_enum
@@ -185,7 +186,7 @@ def submit_job(
185186
186187 def list_jobs (
187188 self ,
188- states : Iterable [str ] | str = "received, queued,processing,done" ,
189+ states : Iterable [JobState | str ] | JobState | str | None = "queued,processing,done" ,
189190 since : pd .Timestamp | datetime | date | str | int | None = None ,
190191 ) -> list [dict [str , Any ]]:
191192 """
@@ -197,8 +198,9 @@ def list_jobs(
197198
198199 Parameters
199200 ----------
200- states : Iterable[str] or str, optional {'received', 'queued', 'processing', 'done', 'expired'} # noqa
201+ states : Iterable[JobState | str] or JobState or str, optional {'queued', 'processing', 'done', 'expired'} # noqa
201202 The filter for jobs states as an iterable of comma separated values.
203+ Defaults to all except 'expired'.
202204 since : pd.Timestamp, datetime, date, str, or int, optional
203205 The filter for timestamp submitted (will not include jobs prior to this).
204206
@@ -209,7 +211,7 @@ def list_jobs(
209211
210212 """
211213 params : list [tuple [str , str | None ]] = [
212- ("states" , optional_values_list_to_string (states )),
214+ ("states" , optional_states_list_to_string (states )),
213215 ("since" , optional_datetime_to_string (since )),
214216 ]
215217
0 commit comments