aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/modeline.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/modeline.py
parent1a9f1508fe9c8c5927ffebf33197a6108e70501d (diff)
downloadydb-bcd5bcc390793791d293d386b2ebefbe683fb4e1.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/modeline.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/modeline.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/python/Pygments/py3/pygments/modeline.py b/contrib/python/Pygments/py3/pygments/modeline.py
index 7b6f6a324b..e4d9fe167b 100644
--- a/contrib/python/Pygments/py3/pygments/modeline.py
+++ b/contrib/python/Pygments/py3/pygments/modeline.py
@@ -4,7 +4,7 @@
A simple modeline parser (based on pymodeline).
- :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.
"""
@@ -19,7 +19,7 @@ modeline_re = re.compile(r'''
''', re.VERBOSE)
-def get_filetype_from_line(l):
+def get_filetype_from_line(l): # noqa: E741
m = modeline_re.search(l)
if m:
return m.group(1)
@@ -30,8 +30,8 @@ def get_filetype_from_buffer(buf, max_lines=5):
Scan the buffer for modelines and return filetype if one is found.
"""
lines = buf.splitlines()
- for l in lines[-1:-max_lines-1:-1]:
- ret = get_filetype_from_line(l)
+ for line in lines[-1:-max_lines-1:-1]:
+ ret = get_filetype_from_line(line)
if ret:
return ret
for i in range(max_lines, -1, -1):