@@ -122,7 +122,7 @@ impl PyAzureStore {
122122 retry_config : Option < PyRetryConfig > ,
123123 kwargs : Option < PyAzureConfig > ,
124124 ) -> PyObjectStoreResult < Self > {
125- // We manually parse the URL to find the prefix because `with_url ` does not apply the
125+ // We manually parse the URL to find the prefix because `parse_url ` does not apply the
126126 // prefix.
127127 let ( _, prefix) =
128128 ObjectStoreScheme :: parse ( url. as_ref ( ) ) . map_err ( object_store:: Error :: from) ?;
@@ -131,27 +131,15 @@ impl PyAzureStore {
131131 } else {
132132 None
133133 } ;
134-
135134 let config = parse_url ( config, url. as_ref ( ) ) ?;
136- let mut builder = MicrosoftAzureBuilder :: from_env ( ) . with_url ( url. clone ( ) ) ;
137- let combined_config = combine_config_kwargs ( Some ( config) , kwargs) ?;
138- builder = combined_config. clone ( ) . apply_config ( builder) ;
139- if let Some ( client_options) = client_options. clone ( ) {
140- builder = builder. with_client_options ( client_options. into ( ) )
141- }
142- if let Some ( retry_config) = retry_config. clone ( ) {
143- builder = builder. with_retry ( retry_config. into ( ) )
144- }
145- Ok ( Self {
146- store : Arc :: new ( MaybePrefixedStore :: new ( builder. build ( ) ?, prefix. clone ( ) ) ) ,
147- config : AzureConfig {
148- prefix,
149- config : combined_config,
150- client_options,
151- retry_config,
152- } ,
153- } )
154- // Ok(Self(Arc::new(builder.build()?)))
135+ Self :: new (
136+ None ,
137+ prefix,
138+ Some ( config) ,
139+ client_options,
140+ retry_config,
141+ kwargs,
142+ )
155143 }
156144
157145 fn __getnewargs_ex__ ( & self , py : Python ) -> PyResult < PyObject > {
0 commit comments