1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-05-08 22:26:04 +02:00

dspace_statistics_api: Use f-strings instead of format()

We had previously been avoiding the f-strings because we needed to
run on Python 3.5 and they were only available in Python 3.6+, but
now the black formatter requires Python 3.6 and all our systems are
running Python 3.6+ anyways.
This commit is contained in:
2020-03-02 11:24:29 +02:00
parent 9e7dd28156
commit 0ef071a91d
3 changed files with 6 additions and 14 deletions

View File

@ -77,9 +77,7 @@ class ItemResource:
if cursor.rowcount == 0:
raise falcon.HTTPNotFound(
title="Item not found",
description='The item with id "{}" was not found.'.format(
str(item_id)
),
description=f'The item with id "{str(item_id)}" was not found.',
)
else:
results = cursor.fetchone()