@@ -471,8 +471,8 @@ def __init__(
471
471
Args:
472
472
target_time_series (str or int): A string or a zero-based integer index.
473
473
Used to locate the target time series in the shared input dataset.
474
- If this parameter is a string, then all other parameters except
475
- `dataset_format` must be strings or lists of strings. If
474
+ If this parameter is a string, then all other parameters except
475
+ `dataset_format` must be strings or lists of strings. If
476
476
this parameter is an int, then all other parameters except
477
477
`dataset_format` must be ints or lists of ints.
478
478
item_id (str or int): A string or a zero-based integer index. Used to
@@ -533,7 +533,9 @@ def __init__(
533
533
)
534
534
if static_covariates :
535
535
if not isinstance (static_covariates , list ):
536
- raise ValueError (static_covariates_series_error_message ) # static_covariates is not a list
536
+ raise ValueError (
537
+ static_covariates_series_error_message
538
+ ) # static_covariates is not a list
537
539
if not all ([isinstance (value , params_type ) for value in static_covariates ]):
538
540
raise ValueError (
539
541
static_covariates_series_error_message
@@ -545,10 +547,14 @@ def __init__(
545
547
) # static_covariates is valid, add it
546
548
if params_type == str :
547
549
# check dataset_format is provided and valid
548
- assert isinstance (dataset_format , TimeSeriesJSONDatasetFormat ), "Please provide a valid dataset format."
550
+ assert isinstance (
551
+ dataset_format , TimeSeriesJSONDatasetFormat
552
+ ), "Please provide a valid dataset format."
549
553
_set (dataset_format .value , "dataset_format" , self .time_series_data_config )
550
554
else :
551
- assert not dataset_format , "Dataset format should only be provided when data files are JSONs."
555
+ assert (
556
+ not dataset_format
557
+ ), "Dataset format should only be provided when data files are JSONs."
552
558
553
559
def get_time_series_data_config (self ):
554
560
"""Returns part of an analysis config dictionary."""
0 commit comments