Updating string format syntax part 1
This commit is contained in:
parent
5196db8cf5
commit
377a4e1ef1
11 changed files with 73 additions and 71 deletions
|
@ -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"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue