@@ -573,11 +573,11 @@ def get_displayed_rating(player: Player) -> float:
573573 )
574574 rating = func (ratings )
575575
576- pool = queue .get_map_pool_for_rating (rating )
577- if not pool :
576+ pool_ = queue .get_map_pool_for_rating (rating )
577+ if not pool_ :
578578 raise RuntimeError (f"No map pool available for rating { rating } !" )
579579
580- pool_id , pool , * _ , max_tokens_per_map , minimum_maps_after_veto = queue .map_pools [pool .id ]
580+ pool_id , pool , * _ , max_tokens_per_map , minimum_maps_after_veto = queue .map_pools [pool_ .id ]
581581
582582 vetoes_map : dict [int , int ] = defaultdict (int )
583583
@@ -845,9 +845,9 @@ def calculate_dynamic_tokens_per_map(self, M: float, tokens: Iterable[int]) -> f
845845 # t is the maximum amount of tokens applied to any single map in current group
846846 t = 0
847847 tokens_sum = 0
848- for index , tokens in enumerate (sorted_tokens ):
848+ for index , tokens_ in enumerate (sorted_tokens ):
849849 # if at [index] our current group is ended
850- if tokens > t :
850+ if tokens_ > t :
851851 maps_balance = index - M
852852 # if our group is only 0-tokened maps
853853 if tokens_sum == 0 and maps_balance >= 0 :
@@ -856,10 +856,10 @@ def calculate_dynamic_tokens_per_map(self, M: float, tokens: Iterable[int]) -> f
856856 # solving the equation
857857 candidate = tokens_sum / maps_balance
858858 # checking it vs upper border
859- if candidate <= tokens :
859+ if candidate <= tokens_ :
860860 return candidate
861- t = tokens
862- tokens_sum += tokens
861+ t = tokens_
862+ tokens_sum += tokens_
863863
864864 # return 0 never happens for correct tokens - M pairs
865865 return 0
0 commit comments