Use f-strings or .format() over percent style

https://docs.astral.sh/ruff/rules/printf-string-formatting/

Signed-off-by: Alfred Wingate <parona@protonmail.com>
This commit is contained in:
Alfred Wingate
2023-11-16 05:56:40 +02:00
parent 21fe4eafec
commit 6c0b816e73
13 changed files with 40 additions and 58 deletions

View File

@ -44,12 +44,11 @@ def scan_url(pkg, url, options):
fnre = re.compile("^%s$" % re.escape(filename).replace(re.escape(ver), "(.*?)"))
output.einfo(
"Using github API for: project=%s user=%s filename=%s"
% (project, user, filename)
f"Using github API for: project={project} user={user} filename={filename}"
)
dlreq = urllib.request.urlopen(
"https://api.github.com/repos/%s/%s/downloads" % (user, project)
f"https://api.github.com/repos/{user}/{project}/downloads"
)
dls = json.load(dlreq)