diff options
author | orivej <orivej@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:01 +0300 |
commit | 2d37894b1b037cf24231090eda8589bbb44fb6fc (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py | |
parent | 718c552901d703c502ccbefdfc3c9028d608b947 (diff) | |
download | ydb-2d37894b1b037cf24231090eda8589bbb44fb6fc.tar.gz |
Restoring authorship annotation for <orivej@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py')
-rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py index 24e9e2756a0..168cb4460b1 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py +++ b/contrib/python/Pygments/py3/pygments/lexers/_php_builtins.py @@ -4685,7 +4685,7 @@ if __name__ == '__main__': # pragma: no cover PHP_MANUAL_URL = 'http://us3.php.net/distributions/manual/php_manual_en.tar.gz' PHP_MANUAL_DIR = './php-chunked-xhtml/' PHP_REFERENCE_GLOB = 'ref.*' - PHP_FUNCTION_RE = r'<a href="function\..*?\.html">(.*?)</a>' + PHP_FUNCTION_RE = r'<a href="function\..*?\.html">(.*?)</a>' PHP_MODULE_RE = '<title>(.*?) Functions</title>' def get_php_functions(): @@ -4695,19 +4695,19 @@ if __name__ == '__main__': # pragma: no cover for file in get_php_references(): module = '' - with open(file) as f: - for line in f: - if not module: - search = module_re.search(line) - if search: - module = search.group(1) - modules[module] = [] + with open(file) as f: + for line in f: + if not module: + search = module_re.search(line) + if search: + module = search.group(1) + modules[module] = [] - elif 'href="function.' in line: - for match in function_re.finditer(line): - fn = match.group(1) - if '->' not in fn and '::' not in fn and fn not in modules[module]: - modules[module].append(fn) + elif 'href="function.' in line: + for match in function_re.finditer(line): + fn = match.group(1) + if '->' not in fn and '::' not in fn and fn not in modules[module]: + modules[module].append(fn) if module: # These are dummy manual pages, not actual functions @@ -4724,8 +4724,8 @@ if __name__ == '__main__': # pragma: no cover def get_php_references(): download = urlretrieve(PHP_MANUAL_URL) - with tarfile.open(download[0]) as tar: - tar.extractall() + with tarfile.open(download[0]) as tar: + tar.extractall() yield from glob.glob("%s%s" % (PHP_MANUAL_DIR, PHP_REFERENCE_GLOB)) os.remove(download[0]) |