1- from typing import List , Any
1+ from typing import List , Any , Optional
22import os
33import bs4
44import urllib3
5- from ci_tools .functions import str_to_bool
5+ from ci_tools .variables import str_to_bool
66
77http = urllib3 .PoolManager ()
88# arguments: |
@@ -124,7 +124,7 @@ def __init__(
124124 common_root : str ,
125125 in_batch : bool ,
126126 checkout : List [CheckoutConfiguration ],
127- created_sdist_path : str = None ,
127+ created_sdist_path : Optional [ str ] = None ,
128128 service : str = "" ,
129129 conda_py_versions : List [str ] = [],
130130 channels : List [str ] = [],
@@ -133,17 +133,17 @@ def __init__(
133133 self .common_root : str = common_root
134134 self .in_batch : bool = in_batch
135135 self .checkout : List [CheckoutConfiguration ] = checkout
136- self .created_sdist_path : str = created_sdist_path
136+ self .created_sdist_path : Optional [ str ] = created_sdist_path
137137 self .service : str = service
138138 self .conda_py_versions = conda_py_versions
139139 self .channels = channels
140140
141141 @classmethod
142142 def from_json (cls , raw_json_blob : dict ):
143- name = raw_json_blob .get ("name" )
143+ name = raw_json_blob .get ("name" , None )
144144 common_root = raw_json_blob .get ("common_root" , None )
145145 in_batch = str_to_bool (raw_json_blob ["in_batch" ])
146- checkout_config = parse_checkout_config (raw_json_blob .get ("checkout" ))
146+ checkout_config = parse_checkout_config (raw_json_blob .get ("checkout" , [] ))
147147 conda_py_versions = raw_json_blob .get ("conda_py_versions" , [])
148148 service = raw_json_blob .get ("service" , None )
149149 channels = raw_json_blob .get ("channels" , [])
0 commit comments