Permalink
Browse files

Remove trailing whitespace.

  • Loading branch information...
1 parent 671e6a5 commit f6762fad87f8d4ab0341281381b7d49c494fe6a2 @robertwb robertwb committed Dec 13, 2010
Showing with 2,969 additions and 2,969 deletions.
  1. +2 −2 COPYING.txt
  2. +25 −25 Cython/Build/Dependencies.py
  3. +3 −3 Cython/Build/Inline.py
  4. +1 −1 Cython/Build/Tests/TestInline.py
  5. +27 −27 Cython/CodeWriter.py
  6. +1 −1 Cython/Compiler/AnalysedTreeTransforms.py
  7. +18 −18 Cython/Compiler/Annotate.py
  8. +2 −2 Cython/Compiler/AutoDocTransforms.py
  9. +28 −28 Cython/Compiler/Buffer.py
  10. +4 −4 Cython/Compiler/Builtin.py
  11. +4 −4 Cython/Compiler/CmdLine.py
  12. +64 −64 Cython/Compiler/Code.py
  13. +23 −23 Cython/Compiler/ControlFlow.py
  14. +6 −6 Cython/Compiler/CythonScope.py
  15. +7 −7 Cython/Compiler/Errors.py
  16. +484 −484 Cython/Compiler/ExprNodes.py
  17. +2 −2 Cython/Compiler/Interpreter.py
  18. +27 −27 Cython/Compiler/Lexicon.py
  19. +27 −27 Cython/Compiler/Main.py
  20. +87 −87 Cython/Compiler/ModuleNode.py
  21. +293 −293 Cython/Compiler/Nodes.py
  22. +19 −19 Cython/Compiler/Optimize.py
  23. +19 −19 Cython/Compiler/Options.py
  24. +81 −81 Cython/Compiler/ParseTreeTransforms.py
  25. +52 −52 Cython/Compiler/Parsing.py
  26. +180 −180 Cython/Compiler/PyrexTypes.py
  27. +26 −26 Cython/Compiler/Scanning.py
  28. +131 −131 Cython/Compiler/Symtab.py
  29. +4 −4 Cython/Compiler/Tests/TestBuffer.py
  30. +1 −1 Cython/Compiler/Tests/TestDecorators.py
  31. +14 −14 Cython/Compiler/Tests/TestParseTreeTransforms.py
  32. +3 −3 Cython/Compiler/Tests/TestTreeFragment.py
  33. +13 −13 Cython/Compiler/TreeFragment.py
  34. +2 −2 Cython/Compiler/TreePath.py
  35. +22 −22 Cython/Compiler/TypeInference.py
  36. +53 −53 Cython/Compiler/TypeSlots.py
  37. +13 −13 Cython/Compiler/UtilNodes.py
  38. +14 −14 Cython/Compiler/Visitor.py
  39. +11 −11 Cython/Debugger/Cygdb.py
  40. +7 −7 Cython/Debugger/DebugWriter.py
  41. +35 −35 Cython/Debugger/Tests/TestLibCython.py
  42. +1 −1 Cython/Debugger/Tests/cfuncs.c
  43. +74 −74 Cython/Debugger/Tests/test_libcython_in_gdb.py
  44. +30 −30 Cython/Debugger/Tests/test_libpython_in_gdb.py
  45. +187 −187 Cython/Debugger/libcython.py
  46. +157 −157 Cython/Debugger/libpython.py
  47. +1 −1 Cython/Distutils/__init__.py
  48. +16 −16 Cython/Distutils/build_ext.py
  49. +5 −5 Cython/Includes/cpython/__init__.pxd
  50. +3 −3 Cython/Includes/cpython/bool.pxd
  51. +2 −2 Cython/Includes/cpython/buffer.pxd
  52. +8 −8 Cython/Includes/cpython/bytes.pxd
  53. +5 −5 Cython/Includes/cpython/complex.pxd
  54. +6 −6 Cython/Includes/cpython/dict.pxd
  55. +3 −3 Cython/Includes/cpython/exc.pxd
  56. +4 −4 Cython/Includes/cpython/float.pxd
  57. +4 −4 Cython/Includes/cpython/function.pxd
  58. +3 −3 Cython/Includes/cpython/instance.pxd
  59. +3 −3 Cython/Includes/cpython/int.pxd
  60. +1 −1 Cython/Includes/cpython/iterator.pxd
  61. +5 −5 Cython/Includes/cpython/list.pxd
  62. +9 −9 Cython/Includes/cpython/long.pxd
  63. +1 −1 Cython/Includes/cpython/mem.pxd
  64. +6 −6 Cython/Includes/cpython/method.pxd
  65. +4 −4 Cython/Includes/cpython/module.pxd
  66. +6 −6 Cython/Includes/cpython/number.pxd
  67. +4 −4 Cython/Includes/cpython/object.pxd
  68. +1 −1 Cython/Includes/cpython/pycapsule.pxd
  69. +1 −1 Cython/Includes/cpython/ref.pxd
  70. +2 −2 Cython/Includes/cpython/sequence.pxd
  71. +5 −5 Cython/Includes/cpython/set.pxd
  72. +8 −8 Cython/Includes/cpython/string.pxd
  73. +4 −4 Cython/Includes/cpython/tuple.pxd
  74. +3 −3 Cython/Includes/cpython/type.pxd
  75. +14 −14 Cython/Includes/cpython/unicode.pxd
  76. +1 −1 Cython/Includes/libc/signal.pxd
  77. +1 −1 Cython/Includes/libc/stdio.pxd
  78. +2 −2 Cython/Includes/libc/stdlib.pxd
  79. +1 −1 Cython/Includes/libc/string.pxd
  80. +19 −19 Cython/Includes/numpy.pxd
  81. +1 −1 Cython/Includes/posix/fcntl.pxd
  82. +1 −1 Cython/Includes/posix/unistd.pxd
  83. +3 −3 Cython/Plex/Actions.py
  84. +3 −3 Cython/Plex/DFA.py
  85. +1 −1 Cython/Plex/Errors.py
  86. +1 −1 Cython/Plex/Lexicons.py
  87. +14 −14 Cython/Plex/Machines.py
  88. +19 −19 Cython/Plex/Regexps.py
  89. +1 −1 Cython/Plex/Scanners.pxd
  90. +3 −3 Cython/Plex/Scanners.py
  91. +12 −12 Cython/Plex/Traditional.py
  92. +29 −29 Cython/Plex/Transitions.py
  93. +13 −13 Cython/Shadow.py
  94. +1 −1 Cython/StringIOTree.py
  95. +10 −10 Cython/TestUtils.py
  96. +5 −5 Cython/Tests/TestCodeWriter.py
  97. +10 −10 Cython/Tests/TestStringIOTree.py
  98. +54 −54 Cython/Tests/xmlrunner.py
  99. +2 −2 Cython/Utils.py
  100. +1 −1 Cython/__init__.py
  101. +2 −2 INSTALL.txt
  102. +1 −1 ToDo.txt
  103. +1 −1 USAGE.txt
  104. +1 −1 tests/broken/b_extimpinherit.pyx
  105. +3 −3 tests/broken/cdefemptysue.pyx
  106. +3 −3 tests/broken/cdefexternblock.pyx
  107. +2 −2 tests/broken/externsue.pyx
  108. +1 −1 tests/broken/getattr.pyx
  109. +1 −1 tests/broken/r_excval.pyx
  110. +1 −1 tests/broken/r_extcmethod.pyx
  111. +1 −1 tests/broken/r_extimpinherit.pyx
  112. +2 −2 tests/broken/r_extinherit.pyx
  113. +2 −2 tests/broken/r_extmember.pyx
  114. +3 −3 tests/broken/r_extnumeric2.pyx
  115. +4 −4 tests/broken/r_extproperty.pyx
  116. +2 −2 tests/bugs.txt
  117. +1 −1 tests/compile/a_capi.pyx
  118. +2 −2 tests/compile/c_directives.pyx
  119. +3 −3 tests/compile/cargdef.pyx
  120. +2 −2 tests/compile/cassign.pyx
  121. +4 −4 tests/compile/cast_ctypedef_array_T518.pyx
  122. +1 −1 tests/compile/cenum.pyx
  123. +1 −1 tests/compile/docstrings.pyx
  124. +1 −1 tests/compile/extcmethcall.pyx
  125. +1 −1 tests/compile/extcoerce.pyx
  126. +1 −1 tests/compile/extdelattr.pyx
  127. +1 −1 tests/compile/extdelitem.pyx
  128. +1 −1 tests/compile/extdelslice.pyx
  129. +1 −1 tests/compile/extgetattr.pyx
  130. +1 −1 tests/compile/extinheritdel.pyx
  131. +1 −1 tests/compile/extinheritset.pyx
  132. +3 −3 tests/compile/extpropertyall.pyx
  133. +1 −1 tests/compile/extsetattr.pyx
  134. +1 −1 tests/compile/extsetitem.pyx
  135. +1 −1 tests/compile/extsetslice.pyx
  136. +7 −7 tests/compile/for.pyx
  137. +1 −1 tests/compile/fromimport.pyx
  138. +1 −1 tests/compile/gencall.pyx
  139. +1 −1 tests/compile/huss2.pyx
  140. +4 −4 tests/compile/ia_cdefblock.pyx
  141. +1 −1 tests/compile/import.pyx
  142. +1 −1 tests/compile/index.pyx
  143. +1 −1 tests/compile/jiba3.pyx
  144. +1 −1 tests/compile/libc_signal.pyx
  145. +1 −1 tests/compile/point.h
  146. +4 −4 tests/compile/pylong.pyx
  147. +11 −11 tests/compile/tryexcept.pyx
  148. +4 −4 tests/compile/tryfinally.pyx
  149. +3 −3 tests/compile/types_and_names.pxd
  150. +2 −2 tests/compile/types_and_names.pyx
  151. +5 −5 tests/compile/while.pyx
  152. +1 −1 tests/errors/e_ass.pyx
  153. +1 −1 tests/errors/e_badtypeuse.pyx
  154. +1 −1 tests/errors/e_bufaccess.pyx
  155. +1 −1 tests/errors/e_cenum.pyx
  156. +1 −1 tests/errors/e_ctypedefornot.pyx
  157. +2 −2 tests/errors/e_slice.pyx
  158. +1 −1 tests/errors/e_tempcast.pyx
  159. +1 −1 tests/errors/encoding.pyx
  160. +1 −1 tests/errors/nogil.pyx
  161. +5 −5 tests/run/__getattribute_subclasses__.pyx
  162. +1 −1 tests/run/autotestdict.pyx
  163. +1 −1 tests/run/autotestdict_all.pyx
  164. +1 −1 tests/run/autotestdict_cdef.pyx
  165. +40 −40 tests/run/bufaccess.pyx
  166. +15 −15 tests/run/buffmt.pyx
  167. +3 −3 tests/run/call_crash.pyx
  168. +2 −2 tests/run/callargs.pyx
  169. +1 −1 tests/run/cdefassign.pyx
  170. +1 −1 tests/run/cdefoptargs.pyx
  171. +4 −4 tests/run/closure_decorators_T478.pyx
  172. +1 −1 tests/run/complex_numbers_T305.pyx
  173. +4 −4 tests/run/cpp_classes.pyx
  174. +1 −1 tests/run/cpp_exceptions.pyx
  175. +10 −10 tests/run/cpp_namespaces_helper.h
  176. +3 −3 tests/run/cpp_nested_templates.pyx
  177. +2 −2 tests/run/cpp_operators.pyx
  178. +3 −3 tests/run/cpp_operators_helper.h
  179. +1 −1 tests/run/cpp_stl.pyx
  180. +1 −1 tests/run/cpp_templates.pyx
  181. +1 −1 tests/run/ctruthtests.pyx
  182. +1 −1 tests/run/cython_includes.pyx
  183. +1 −1 tests/run/dict_getitem.pyx
  184. +1 −1 tests/run/exceptionrefcount.pyx
  185. +1 −1 tests/run/extcmethod.pyx
  186. +1 −1 tests/run/extern_builtins_T258.pyx
  187. +1 −1 tests/run/extpropertyref.pyx
  188. +2 −2 tests/run/exttype.pyx
  189. +2 −2 tests/run/for_decrement.pyx
  190. +1 −1 tests/run/function_as_method_T494.pyx
  191. +1 −1 tests/run/function_binding_T494.pyx
  192. +1 −1 tests/run/hash_T326.pyx
  193. +1 −1 tests/run/if.pyx
  194. +1 −1 tests/run/ifelseexpr_T267.pyx
  195. +1 −1 tests/run/importfrom.pyx
  196. +1 −1 tests/run/index.pyx
  197. +4 −4 tests/run/inplace.pyx
  198. +2 −2 tests/run/int_literals.pyx
  199. +1 −1 tests/run/knuth_man_or_boy_test.pyx
  200. +1 −1 tests/run/large_consts_T237.pyx
  201. +8 −8 tests/run/list_pop.pyx
  202. +2 −2 tests/run/literals.pyx
  203. +1 −1 tests/run/modbody.pyx
  204. +2 −2 tests/run/moduletryexcept.pyx
  205. +1 −1 tests/run/numpy_common.pxi
  206. +14 −14 tests/run/numpy_test.pyx
  207. +1 −1 tests/run/pinard5.pyx
  208. +2 −2 tests/run/pure.pyx
  209. +2 −2 tests/run/pure_py.py
  210. +3 −3 tests/run/r_extcomplex2.pyx
  211. +1 −1 tests/run/r_forloop.pyx
  212. +1 −1 tests/run/r_huss3.pyx
  213. +1 −1 tests/run/r_pythonapi.pyx
  214. +4 −4 tests/run/r_spamtype.pyx
  215. +4 −4 tests/run/shapes.h
  216. +2 −2 tests/run/simpcall.pyx
  217. +1 −1 tests/run/slice3.pyx
  218. +1 −1 tests/run/slice_ptr.pyx
  219. +5 −5 tests/run/special_methods_T561.pyx
  220. +1 −1 tests/run/special_methods_T561_py2.pyx
  221. +1 −1 tests/run/strfunction.pyx
  222. +1 −1 tests/run/strliterals.pyx
  223. +3 −3 tests/run/struct_conversion.pyx
  224. +1 −1 tests/run/subop.pyx
  225. +1 −1 tests/run/temps_corner1.pyx
  226. +3 −3 tests/run/type_inference.pyx
  227. +1 −1 tests/run/typedfieldbug_T303.pyx
  228. +1 −1 tests/run/typeof.pyx
  229. +18 −18 tests/run/unicodemethods.pyx
  230. +1 −1 tests/run/unsignedbehaviour_T184.pyx
  231. +4 −4 tests/run/withstat.pyx
  232. +1 −1 tests/wrappers/cpp_overload_wrapper_lib.cpp
  233. +2 −2 tests/wrappers/cpp_overload_wrapper_lib.h
  234. +1 −1 tests/wrappers/cpp_references.pyx
  235. +2 −2 tests/wrappers/cppwrap_lib.h
View
@@ -5,9 +5,9 @@ redistribute, modify and distribute modified versions."
------------------
Cython, which derives from Pyrex, is licensed under the Python
-Software Foundation License. More precisely, all modifications
+Software Foundation License. More precisely, all modifications
made to go from Pyrex to Cython are so licensed.
See LICENSE.txt for more details.
-
+
@@ -36,7 +36,7 @@ def unquote(literal):
return literals[literal[1:-1]]
else:
return literal
-
+
return [unquote(item) for item in s.split(delimiter)]
transitive_str = object()
@@ -70,7 +70,7 @@ def line_iter(source):
start = end+1
class DistutilsInfo(object):
-
+
def __init__(self, source=None, exn=None):
self.values = {}
if source is not None:
@@ -97,7 +97,7 @@ def __init__(self, source=None, exn=None):
value = getattr(exn, key, None)
if value:
self.values[key] = value
-
+
def merge(self, other):
if other is None:
return self
@@ -114,7 +114,7 @@ def merge(self, other):
else:
self.values[key] = value
return self
-
+
def subs(self, aliases):
if aliases is None:
return self
@@ -140,9 +140,9 @@ def subs(self, aliases):
def strip_string_literals(code, prefix='__Pyx_L'):
"""
- Normalizes every string literal to be of the form '__Pyx_Lxxx',
+ Normalizes every string literal to be of the form '__Pyx_Lxxx',
returning the normalized code and a mapping of labels to
- string literals.
+ string literals.
"""
new_code = []
literals = {}
@@ -156,7 +156,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
double_q = code.find('"', q)
q = min(single_q, double_q)
if q == -1: q = max(single_q, double_q)
-
+
# We're done.
if q == -1 and hash_mark == -1:
new_code.append(code[start:])
@@ -181,7 +181,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
start = q
else:
q += 1
-
+
# Process comment.
elif -1 != hash_mark and (hash_mark < q or q == -1):
end = code.find('\n', hash_mark)
@@ -212,7 +212,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
new_code.append(code[start:end])
start = q
q += len(in_quote)
-
+
return "".join(new_code), literals
@@ -245,16 +245,16 @@ def parse_dependencies(source_filename):
class DependencyTree(object):
-
+
def __init__(self, context):
self.context = context
self._transitive_cache = {}
-
+
#@cached_method
def parse_dependencies(self, source_filename):
return parse_dependencies(source_filename)
parse_dependencies = cached_method(parse_dependencies)
-
+
#@cached_method
def cimports_and_externs(self, filename):
cimports, includes, externs = self.parse_dependencies(filename)[:3]
@@ -272,10 +272,10 @@ def cimports_and_externs(self, filename):
print("Unable to locate '%s' referenced from '%s'" % (filename, include))
return tuple(cimports), tuple(externs)
cimports_and_externs = cached_method(cimports_and_externs)
-
+
def cimports(self, filename):
return self.cimports_and_externs(filename)[0]
-
+
#@cached_method
def package(self, filename):
dir = os.path.dirname(filename)
@@ -284,13 +284,13 @@ def package(self, filename):
else:
return ()
package = cached_method(package)
-
+
#@cached_method
def fully_qualifeid_name(self, filename):
module = os.path.splitext(os.path.basename(filename))[0]
return '.'.join(self.package(filename) + (module,))
fully_qualifeid_name = cached_method(fully_qualifeid_name)
-
+
def find_pxd(self, module, filename=None):
if module[0] == '.':
raise NotImplementedError("New relative imports.")
@@ -301,7 +301,7 @@ def find_pxd(self, module, filename=None):
return pxd
return self.context.find_pxd_file(module, None)
find_pxd = cached_method(find_pxd)
-
+
#@cached_method
def cimported_files(self, filename):
if filename[-4:] == '.pyx' and os.path.exists(filename[:-4] + '.pxd'):
@@ -316,41 +316,41 @@ def cimported_files(self, filename):
print("\n\t".join(b))
return tuple(self_pxd + filter(None, [self.find_pxd(m, filename) for m in self.cimports(filename)]))
cimported_files = cached_method(cimported_files)
-
+
def immediate_dependencies(self, filename):
all = list(self.cimported_files(filename))
for extern in sum(self.cimports_and_externs(filename), ()):
all.append(os.path.normpath(os.path.join(os.path.dirname(filename), extern)))
return tuple(all)
-
+
#@cached_method
def timestamp(self, filename):
return os.path.getmtime(filename)
timestamp = cached_method(timestamp)
-
+
def extract_timestamp(self, filename):
# TODO: .h files from extern blocks
return self.timestamp(filename), filename
-
+
def newest_dependency(self, filename):
return self.transitive_merge(filename, self.extract_timestamp, max)
-
+
def distutils_info0(self, filename):
return self.parse_dependencies(filename)[3]
-
+
def distutils_info(self, filename, aliases=None, base=None):
return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
.subs(aliases)
.merge(base))
-
+
def transitive_merge(self, node, extract, merge):
try:
seen = self._transitive_cache[extract, merge]
except KeyError:
seen = self._transitive_cache[extract, merge] = {}
return self.transitive_merge_helper(
node, extract, merge, seen, {}, self.cimported_files)[0]
-
+
def transitive_merge_helper(self, node, extract, merge, seen, stack, outgoing):
if node in seen:
return seen[node], None
View
@@ -88,7 +88,7 @@ def safe_type(arg, context=None):
return '%s.%s' % (base_type.__module__, base_type.__name__)
return 'object'
-def cython_inline(code,
+def cython_inline(code,
get_type=unsafe_type,
lib_dir=os.path.expanduser('~/.cython/inline'),
cython_include_dirs=['.'],
@@ -252,14 +252,14 @@ def get_body(source):
else:
return source[ix+1:]
-# Lots to be done here... It would be especially cool if compiled functions
+# Lots to be done here... It would be especially cool if compiled functions
# could invoke each other quickly.
class RuntimeCompiledFunction(object):
def __init__(self, f):
self._f = f
self._body = get_body(inspect.getsource(f))
-
+
def __call__(self, *args, **kwds):
all = getcallargs(self._f, *args, **kwds)
return cython_inline(self._body, locals=self._f.func_globals, globals=self._f.func_globals, **all)
@@ -32,7 +32,7 @@ def test_globals(self):
self.assertEquals(inline("return global_value + 1", **test_kwds), global_value + 1)
if has_numpy:
-
+
def test_numpy(self):
import numpy
a = numpy.ndarray((10, 20))
Oops, something went wrong.

0 comments on commit f6762fa

Please sign in to comment.