mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Use f-strings in place of .format()
Code transformed like so:
pip install flynt
flynt .
black .
This commit is contained in:
parent
6fd35be64d
commit
30e64c8d3b
35 changed files with 213 additions and 277 deletions
|
|
@ -260,7 +260,7 @@ async def asgi_send_file(
|
|||
):
|
||||
headers = headers or {}
|
||||
if filename:
|
||||
headers["content-disposition"] = 'attachment; filename="{}"'.format(filename)
|
||||
headers["content-disposition"] = f'attachment; filename="{filename}"'
|
||||
first = True
|
||||
headers["content-length"] = str((await aiofiles.os.stat(str(filepath))).st_size)
|
||||
async with aiofiles.open(str(filepath), mode="rb") as fp:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue