aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-05-20 07:58:40 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-05-20 08:05:00 +0300
commitbcd5bcc390793791d293d386b2ebefbe683fb4e1 (patch)
treec93e3b8c847237e7e7626f4a07f1b657bb34f04d /contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py
parent1a9f1508fe9c8c5927ffebf33197a6108e70501d (diff)
downloadydb-bcd5bcc390793791d293d386b2ebefbe683fb4e1.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py
index ecc2a7eef1..f29235598a 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py
@@ -6,7 +6,7 @@
Run with `python -I` to update itself.
- :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -683,7 +683,8 @@ if __name__ == '__main__': # pragma: no cover
for t in tmp.split(']') if "(" not in t]:
for t in tmp.split(','):
t = t.strip()
- if not t: continue
+ if not t:
+ continue
dt.add(" ".join(t.split()))
dt = list(dt)
@@ -724,11 +725,10 @@ if __name__ == '__main__': # pragma: no cover
data = f.read()
# Line to start/end inserting
- re_match = re.compile(r'^%s\s*=\s*\($.*?^\s*\)$' % constname, re.M | re.S)
+ re_match = re.compile(rf'^{constname}\s*=\s*\($.*?^\s*\)$', re.M | re.S)
m = re_match.search(data)
if not m:
- raise ValueError('Could not find existing definition for %s' %
- (constname,))
+ raise ValueError(f'Could not find existing definition for {constname}')
new_block = format_lines(constname, content)
data = data[:m.start()] + new_block + data[m.end():]