Updating string format syntax part 1

This commit is contained in:
Mouse Reeve
2021-09-17 21:39:18 -07:00
parent 5196db8cf5
commit 377a4e1ef1
11 changed files with 73 additions and 71 deletions

View File

@ -24,8 +24,8 @@ class SuggestedUsers(RedisStore):
def store_id(self, user): # pylint: disable=no-self-use
"""the key used to store this user's recs"""
if isinstance(user, int):
return "{:d}-suggestions".format(user)
return "{:d}-suggestions".format(user.id)
return f"{user}-suggestions"
return f"{user.id}-suggestions"
def get_counts_from_rank(self, rank): # pylint: disable=no-self-use
"""calculate mutuals count and shared books count from rank"""