@@ -97,9 +97,9 @@ def __init__(
9797 def _set_config (self , datafile ):
9898 """ Looks up and sets datafile and config based on response body.
9999
100- Args:
101- datafile: JSON string representing the Optimizely project.
102- """
100+ Args:
101+ datafile: JSON string representing the Optimizely project.
102+ """
103103
104104 if self .validate_schema :
105105 if not validator .is_datafile_valid (datafile ):
@@ -239,9 +239,9 @@ def get_datafile_url(sdk_key, url, url_template):
239239 def _set_config (self , datafile ):
240240 """ Looks up and sets datafile and config based on response body.
241241
242- Args:
243- datafile: JSON string representing the Optimizely project.
244- """
242+ Args:
243+ datafile: JSON string representing the Optimizely project.
244+ """
245245 if datafile or self ._config_ready_event .is_set ():
246246 super (PollingConfigManager , self )._set_config (datafile = datafile )
247247 self ._config_ready_event .set ()
@@ -261,7 +261,7 @@ def set_update_interval(self, update_interval):
261261 """ Helper method to set frequency at which datafile has to be polled and ProjectConfig updated.
262262
263263 Args:
264- update_interval: Time in seconds after which to update datafile.
264+ update_interval: Time in seconds after which to update datafile.
265265 """
266266 if update_interval is None :
267267 update_interval = enums .ConfigManager .DEFAULT_UPDATE_INTERVAL
@@ -287,7 +287,7 @@ def set_blocking_timeout(self, blocking_timeout):
287287 """ Helper method to set time in seconds to block the config call until config has been initialized.
288288
289289 Args:
290- blocking_timeout: Time in seconds to block the config call.
290+ blocking_timeout: Time in seconds to block the config call.
291291 """
292292 if blocking_timeout is None :
293293 blocking_timeout = enums .ConfigManager .DEFAULT_BLOCKING_TIMEOUT
@@ -312,9 +312,9 @@ def set_blocking_timeout(self, blocking_timeout):
312312 def set_last_modified (self , response_headers ):
313313 """ Looks up and sets last modified time based on Last-Modified header in the response.
314314
315- Args:
316- response_headers: requests.Response.headers
317- """
315+ Args:
316+ response_headers: requests.Response.headers
317+ """
318318 self .last_modified = response_headers .get (enums .HTTPHeaders .LAST_MODIFIED )
319319
320320 def _handle_response (self , response ):
@@ -379,32 +379,32 @@ class AuthDatafilePollingConfigManager(PollingConfigManager):
379379
380380 def __init__ (
381381 self ,
382- access_token ,
382+ datafile_access_token ,
383383 * args ,
384384 ** kwargs
385385 ):
386386 """ Initialize config manager. One of sdk_key or url has to be set to be able to use.
387387
388388 Args:
389- access_token : String to be attached to the request header to fetch the authenticated datafile.
389+ datafile_access_token : String to be attached to the request header to fetch the authenticated datafile.
390390 *args: Refer to arguments descriptions in PollingConfigManager.
391391 **kwargs: Refer to keyword arguments descriptions in PollingConfigManager.
392392 """
393- self ._set_access_token ( access_token )
393+ self ._set_datafile_access_token ( datafile_access_token )
394394 super (AuthDatafilePollingConfigManager , self ).__init__ (* args , ** kwargs )
395395
396- def _set_access_token (self , access_token ):
396+ def _set_datafile_access_token (self , datafile_access_token ):
397397 """ Checks for valid access token input and sets it. """
398- if not access_token :
398+ if not datafile_access_token :
399399 raise optimizely_exceptions .InvalidInputException (
400- 'access_token cannot be empty or None.' )
401- self .access_token = access_token
400+ 'datafile_access_token cannot be empty or None.' )
401+ self .datafile_access_token = datafile_access_token
402402
403403 def fetch_datafile (self ):
404404 """ Fetch authenticated datafile and set ProjectConfig. """
405405 request_headers = {
406406 enums .HTTPHeaders .AUTHORIZATION : enums .ConfigManager .AUTHORIZATION_HEADER_DATA_TEMPLATE .format (
407- access_token = self .access_token
407+ datafile_access_token = self .datafile_access_token
408408 )
409409 }
410410
0 commit comments