@@ -131,7 +131,7 @@ def __init__(self, base_url: str, cache_max_size: int, timer: Callable[[[]], int
131131 raise ValueError ("timer is required" )
132132 self ._token_cache = LRUCache (maxsize = cache_max_size , timer = timer )
133133 self ._user_cache = LRUCache (maxsize = cache_max_size , timer = timer )
134- self ._user_name_cache = LRUCache (maxsize = cache_max_size , timer = timer )
134+ self ._username_cache = LRUCache (maxsize = cache_max_size , timer = timer )
135135 self ._cli = httpx .Client ()
136136
137137 def __enter__ (self ):
@@ -224,7 +224,7 @@ def validate_usernames(
224224 to_return = {}
225225 to_query = set ()
226226 for u in uns .keys ():
227- if self ._user_name_cache .get (u , default = False ):
227+ if self ._username_cache .get (u , default = False ):
228228 to_return [u ] = True
229229 else :
230230 if on_cache_miss :
@@ -244,8 +244,8 @@ def validate_usernames(
244244 if not tk : # minor optimization, don't get the token until it's needed
245245 tk = self .get_token (token )
246246 # Usernames are permanent but can be disabled, so we expire based on time
247- # Don't cache non-existant names, could be created at any time and would
247+ # Don't cache non-existent names, could be created at any time and would
248248 # be terrible UX for new users
249249 # TODO TEST later may want to add tests that change the cachefor value.
250- self ._user_name_cache .set (u , True , ttl = tk .cachefor / 1000 )
250+ self ._username_cache .set (u , True , ttl = tk .cachefor / 1000 )
251251 return to_return
0 commit comments