diff options
| author | orivej <[email protected]> | 2022-02-10 16:44:49 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:49 +0300 | 
| commit | 718c552901d703c502ccbefdfc3c9028d608b947 (patch) | |
| tree | 46534a98bbefcd7b1f3faa5b52c138ab27db75b7 /contrib/tools/cython/Cython/Compiler/Errors.py | |
| parent | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/cython/Cython/Compiler/Errors.py')
| -rw-r--r-- | contrib/tools/cython/Cython/Compiler/Errors.py | 14 | 
1 files changed, 7 insertions, 7 deletions
| diff --git a/contrib/tools/cython/Cython/Compiler/Errors.py b/contrib/tools/cython/Cython/Compiler/Errors.py index 9761b52c32f..aa7a40437c4 100644 --- a/contrib/tools/cython/Cython/Compiler/Errors.py +++ b/contrib/tools/cython/Cython/Compiler/Errors.py @@ -4,11 +4,11 @@  from __future__ import absolute_import -try: -    from __builtin__ import basestring as any_string_type -except ImportError: -    any_string_type = (bytes, str) - +try:  +    from __builtin__ import basestring as any_string_type  +except ImportError:  +    any_string_type = (bytes, str)  +   import sys  from contextlib import contextmanager @@ -27,7 +27,7 @@ class PyrexWarning(Exception):  def context(position):      source = position[0] -    assert not (isinstance(source, any_string_type)), ( +    assert not (isinstance(source, any_string_type)), (           "Please replace filename strings with Scanning.FileSourceDescriptor instances %r" % source)      try:          F = source.get_lines() @@ -173,7 +173,7 @@ def report_error(err, use_stack=True):  def error(position, message): -    #print("Errors.error:", repr(position), repr(message)) ### +    #print("Errors.error:", repr(position), repr(message)) ###       if position is None:          raise InternalError(message)      err = CompileError(position, message) | 
