Skip to content

Commit

Permalink
lib.web: use f-string.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwilk committed Mar 16, 2024
1 parent ad5df9b commit 9f5df57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ def __init__(self, *, code, location=None):
self.ok = self.code == http.HTTPStatus.OK

def __str__(self):
return '{hs} {hs.phrase}'.format(hs=self.code) # pylint: disable=missing-format-attribute
hs = self.code
return f'{hs} {hs.phrase}' # pylint: disable=missing-format-attribute

status_ok = Status(code=http.HTTPStatus.OK)
assert status_ok.ok
Expand Down

0 comments on commit 9f5df57

Please sign in to comment.