aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-09 14:39:19 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-06-09 14:39:19 +0300
commitc04b663c7bb4b750deeb8f48f620497ec13da8fa (patch)
tree151ebc8bfdd2ad918caf5e6e2d8013e14272ddf8 /contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py
parent0d55ca22c507d18c2f35718687e0b06d9915397b (diff)
downloadydb-c04b663c7bb4b750deeb8f48f620497ec13da8fa.tar.gz
intermediate changes
ref:2d4f292087954c9344efdabb7b2a67f466263c65
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py')
-rw-r--r--contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py24
1 files changed, 9 insertions, 15 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py
index f6a9b796ee9..08bcfb17c4a 100644
--- a/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py
+++ b/contrib/python/Pygments/py3/pygments/lexers/_lua_builtins.py
@@ -8,7 +8,9 @@
Do not edit the MODULES dict by hand.
- :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
+ Run with `python -I` to regenerate.
+
+ :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -35,6 +37,7 @@ MODULES = {'basic': ('_G',
'tonumber',
'tostring',
'type',
+ 'warn',
'xpcall'),
'bit32': ('bit32.arshift',
'bit32.band',
@@ -48,7 +51,8 @@ MODULES = {'basic': ('_G',
'bit32.replace',
'bit32.rrotate',
'bit32.rshift'),
- 'coroutine': ('coroutine.create',
+ 'coroutine': ('coroutine.close',
+ 'coroutine.create',
'coroutine.isyieldable',
'coroutine.resume',
'coroutine.running',
@@ -173,17 +177,7 @@ MODULES = {'basic': ('_G',
if __name__ == '__main__': # pragma: no cover
import re
import sys
-
- # urllib ends up wanting to import a module called 'math' -- if
- # pygments/lexers is in the path, this ends badly.
- for i in range(len(sys.path)-1, -1, -1):
- if sys.path[i].endswith('/lexers'):
- del sys.path[i]
-
- try:
- from urllib import urlopen
- except ImportError:
- from urllib.request import urlopen
+ from urllib.request import urlopen
import pprint
# you can't generally find out what module a function belongs to if you
@@ -232,7 +226,7 @@ if __name__ == '__main__': # pragma: no cover
f = urlopen('http://www.lua.org/manual/')
r = re.compile(r'^<A HREF="(\d\.\d)/">(Lua )?\1</A>')
for line in f:
- m = r.match(line)
+ m = r.match(line.decode('iso-8859-1'))
if m is not None:
return m.groups()[0]
@@ -241,7 +235,7 @@ if __name__ == '__main__': # pragma: no cover
r = re.compile(r'^<A HREF="manual.html#pdf-(?!lua|LUA)([^:]+)">\1</A>')
functions = []
for line in f:
- m = r.match(line)
+ m = r.match(line.decode('iso-8859-1'))
if m is not None:
functions.append(m.groups()[0])
return functions