File tree Expand file tree Collapse file tree
xbox/webapi/common/ratelimits Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11from datetime import datetime , timedelta
2- from typing import Union
2+ from typing import Union , List
33
44from xbox .webapi .common .ratelimits .models import (
55 ParsedRateLimit ,
@@ -173,10 +173,12 @@ def get_reset_after(self) -> Union[datetime, None]:
173173 # dates_valid has no elements, return None
174174 return None
175175
176- def get_limits (self ) -> list [SingleRateLimit ]:
176+ # list -> List (typing.List) https://stackoverflow.com/a/63460173
177+ def get_limits (self ) -> List [SingleRateLimit ]:
177178 return self .__limits
178179
179- def get_limits_by_period (self , period : TimePeriod ) -> list [SingleRateLimit ]:
180+ # list -> List (typing.List) https://stackoverflow.com/a/63460173
181+ def get_limits_by_period (self , period : TimePeriod ) -> List [SingleRateLimit ]:
180182 # Filter the list for the given LimitType
181183 matches = filter (lambda limit : limit .get_time_period () == period , self .__limits )
182184 # Convert the filter object to a list and return it
You can’t perform that action at this time.
0 commit comments