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

@ -16,11 +16,11 @@ class ActivityStream(RedisStore):
def stream_id(self, user):
"""the redis key for this user's instance of this stream"""
return "{}-{}".format(user.id, self.key)
return f"{user.id}-{self.key}"
def unread_id(self, user):
"""the redis key for this user's unread count for this stream"""
return "{}-unread".format(self.stream_id(user))
return "{}-unread".format(self.stream_id(user)) # pylint: disable=consider-using-f-string
def get_rank(self, obj): # pylint: disable=no-self-use
"""statuses are sorted by date published"""