Skip to content

Commit a95c669

Browse files
committed
refact: nits
1 parent 2aa243c commit a95c669

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

optimizely/optimizely_config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ def _create_lookup_maps(self):
113113
self.feature_key_variable_key_to_variable_map[feature['key']] = variables_key_map
114114
self.feature_key_variable_id_to_variable_map[feature['key']] = variables_id_map
115115

116-
def _get_variables_map(self, variation, experiment):
117-
""" Gets variables map for given variation and experiment.
116+
def _get_variables_map(self, experiment, variation):
117+
""" Gets variables map for given experiment and variation.
118118
119119
Args:
120-
variation dict
121-
experiment dict
120+
experiment dict -- Experiment parsed from the datafile.
121+
variation dict -- Variation of the given experiment.
122122
123123
Returns:
124124
dict - Map of variable key to OptimizelyVariable for the given variation.
@@ -143,15 +143,15 @@ def _get_variations_map(self, experiment):
143143
""" Gets variation map for the given experiment.
144144
145145
Args:
146-
experiment dict
146+
experiment dict -- Experiment parsed from the datafile.
147147
148148
Returns:
149149
dict -- Map of variation key to OptimizelyVariation.
150150
"""
151151
variations_map = {}
152152

153153
for variation in experiment.get('variations', []):
154-
variables_map = self._get_variables_map(variation, experiment)
154+
variables_map = self._get_variables_map(experiment, variation)
155155
feature_enabled = variation.get('featureEnabled', None)
156156

157157
optly_variation = OptimizelyVariation(

tests/test_optimizely_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def test__get_variables_map(self):
461461

462462
experiment = self.project_config.experiments[0]
463463
variation = experiment['variations'][0]
464-
actual_variables_map = self.opt_config_service._get_variables_map(variation, experiment)
464+
actual_variables_map = self.opt_config_service._get_variables_map(experiment, variation)
465465

466466
expected_variations_map = self.expected_config['experiments_map']['test_experiment']['variations_map']
467467
expected_variables_map = expected_variations_map['control']['variables_map']

0 commit comments

Comments
 (0)