diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-20 07:58:40 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-20 08:05:00 +0300 |
commit | bcd5bcc390793791d293d386b2ebefbe683fb4e1 (patch) | |
tree | c93e3b8c847237e7e7626f4a07f1b657bb34f04d /contrib/python/Pygments/py3/pygments/lexers/_postgres_builtins.py | |
parent | 1a9f1508fe9c8c5927ffebf33197a6108e70501d (diff) | |
download | ydb-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.py | 10 |
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():] |