@@ -114,10 +114,10 @@ def __init__(self, user_id: str, user_profile_service: Optional[UserProfileServi
114
114
self .profile_updated = False
115
115
self .user_profile = UserProfile (user_id , {})
116
116
117
- def get_user_profile (self ):
117
+ def get_user_profile (self ) -> None :
118
118
return self .user_profile
119
119
120
- def load_user_profile (self , reasons : Optional [list [str ]]= [], error_handler : Optional [BaseErrorHandler ]= None ):
120
+ def load_user_profile (self , reasons : Optional [list [str ]]= [], error_handler : Optional [BaseErrorHandler ]= None ) -> None :
121
121
reasons = reasons if reasons else []
122
122
try :
123
123
user_profile = self .user_profile_service .lookup (self .user_id ) if self .user_profile_service else None
@@ -146,7 +146,7 @@ def load_user_profile(self, reasons: Optional[list[str]]=[], error_handler: Opti
146
146
if self .user_profile is None :
147
147
self .user_profile = UserProfile (self .user_id , {})
148
148
149
- def update_user_profile (self , experiment : Experiment , variation : Variation ):
149
+ def update_user_profile (self , experiment : Experiment , variation : Variation ) -> None :
150
150
if experiment .id in self .user_profile .experiment_bucket_map :
151
151
decision = self .user_profile .experiment_bucket_map [experiment .id ]
152
152
if isinstance (decision , decision_service .Decision ):
@@ -163,7 +163,7 @@ def update_user_profile(self, experiment: Experiment, variation: Variation):
163
163
# self.logger.info(f'Updated variation "{variation.id}" of experiment "{experiment.id}" for user "{self.user_profile.user_id}".')
164
164
165
165
166
- def save_user_profile (self , error_handler : Optional [BaseErrorHandler ] = None ):
166
+ def save_user_profile (self , error_handler : Optional [BaseErrorHandler ] = None ) -> None :
167
167
if not self .profile_updated :
168
168
return
169
169
try :
0 commit comments