summaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Compiler/TreePath.py
diff options
context:
space:
mode:
authorshadchin <[email protected]>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/cython/Cython/Compiler/TreePath.py
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Compiler/TreePath.py')
-rw-r--r--contrib/tools/cython/Cython/Compiler/TreePath.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/contrib/tools/cython/Cython/Compiler/TreePath.py b/contrib/tools/cython/Cython/Compiler/TreePath.py
index 8585905557b..978f2f6c5c2 100644
--- a/contrib/tools/cython/Cython/Compiler/TreePath.py
+++ b/contrib/tools/cython/Cython/Compiler/TreePath.py
@@ -10,13 +10,13 @@ from __future__ import absolute_import
import re
import operator
-import sys
-
-if sys.version_info[0] >= 3:
- _unicode = str
-else:
- _unicode = unicode
+import sys
+if sys.version_info[0] >= 3:
+ _unicode = str
+else:
+ _unicode = unicode
+
path_tokenizer = re.compile(
r"("
r"'[^']*'|\"[^\"]*\"|"
@@ -173,11 +173,11 @@ def handle_attribute(next, token):
continue
if attr_value == value:
yield attr_value
- elif (isinstance(attr_value, bytes) and isinstance(value, _unicode) and
- attr_value == value.encode()):
- # allow a bytes-to-string comparison too
- yield attr_value
-
+ elif (isinstance(attr_value, bytes) and isinstance(value, _unicode) and
+ attr_value == value.encode()):
+ # allow a bytes-to-string comparison too
+ yield attr_value
+
return select