summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorHugo van Kemenade <hugovk@users.noreply.github.com>2020-11-17 23:52:11 +0200
committerHugo van Kemenade <hugovk@users.noreply.github.com>2020-11-17 23:52:11 +0200
commit8d7f660309c8be0fb0b50439c335b89d5b31878d (patch)
tree5ae01d1c41e601d987c21df8128ca3429c2657fa /doc/src
parentd956eaa3b1842a14895685be0d6d5e380fd029fc (diff)
downloadpsycopg2-8d7f660309c8be0fb0b50439c335b89d5b31878d.tar.gz
Upgrade f-strings with flynt
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/tools/make_sqlstate_docs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/tools/make_sqlstate_docs.py b/doc/src/tools/make_sqlstate_docs.py
index ce6d2e7..16fd9c9 100644
--- a/doc/src/tools/make_sqlstate_docs.py
+++ b/doc/src/tools/make_sqlstate_docs.py
@@ -25,8 +25,8 @@ def main():
for k in sorted(sqlstate_errors):
exc = sqlstate_errors[k]
lines.append(Line(
- "``%s``" % k, "`!%s`" % exc.__name__,
- "`!%s`" % get_base_exception(exc).__name__, k))
+ f"``{k}``", f"`!{exc.__name__}`",
+ f"`!{get_base_exception(exc).__name__}`", k))
widths = [max(len(l[c]) for l in lines) for c in range(3)]
h = Line(*(['=' * w for w in widths] + [None]))
@@ -39,7 +39,7 @@ def main():
for l in lines:
cls = l.sqlstate[:2] if l.sqlstate else None
if cls and cls != sqlclass:
- print("**Class {}**: {}".format(cls, sqlclasses[cls]))
+ print(f"**Class {cls}**: {sqlclasses[cls]}")
print(h1)
sqlclass = cls