aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Compiler/Scanning.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/cython/Cython/Compiler/Scanning.py
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Compiler/Scanning.py')
-rw-r--r--contrib/tools/cython/Cython/Compiler/Scanning.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/contrib/tools/cython/Cython/Compiler/Scanning.py b/contrib/tools/cython/Cython/Compiler/Scanning.py
index ea33eee7a2..c721bba69b 100644
--- a/contrib/tools/cython/Cython/Compiler/Scanning.py
+++ b/contrib/tools/cython/Cython/Compiler/Scanning.py
@@ -41,8 +41,8 @@ py_reserved_words = [
"global", "nonlocal", "def", "class", "print", "del", "pass", "break",
"continue", "return", "raise", "import", "exec", "try",
"except", "finally", "while", "if", "elif", "else", "for",
- "in", "assert", "and", "or", "not", "is", "lambda",
- "from", "yield", "with",
+ "in", "assert", "and", "or", "not", "is", "lambda",
+ "from", "yield", "with",
]
pyx_reserved_words = py_reserved_words + [
@@ -324,25 +324,25 @@ class PyrexScanner(Scanner):
def __init__(self, file, filename, parent_scanner=None,
scope=None, context=None, source_encoding=None, parse_comments=True, initial_pos=None):
Scanner.__init__(self, get_lexicon(), file, filename, initial_pos)
-
- if filename.is_python_file():
- self.in_python_file = True
- self.keywords = set(py_reserved_words)
- else:
- self.in_python_file = False
- self.keywords = set(pyx_reserved_words)
-
- self.async_enabled = 0
-
+
+ if filename.is_python_file():
+ self.in_python_file = True
+ self.keywords = set(py_reserved_words)
+ else:
+ self.in_python_file = False
+ self.keywords = set(pyx_reserved_words)
+
+ self.async_enabled = 0
+
if parent_scanner:
self.context = parent_scanner.context
self.included_files = parent_scanner.included_files
self.compile_time_env = parent_scanner.compile_time_env
self.compile_time_eval = parent_scanner.compile_time_eval
self.compile_time_expr = parent_scanner.compile_time_expr
-
- if parent_scanner.async_enabled:
- self.enter_async()
+
+ if parent_scanner.async_enabled:
+ self.enter_async()
else:
self.context = context
self.included_files = scope.included_files
@@ -357,7 +357,7 @@ class PyrexScanner(Scanner):
self.indentation_stack = [0]
self.indentation_char = None
self.bracket_nesting_level = 0
-
+
self.begin('INDENT')
self.sy = ''
self.next()