Skip to content

Commit f6762fa

Browse files
committed
Remove trailing whitespace.
1 parent 671e6a5 commit f6762fa

File tree

235 files changed

+2969
-2969
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

235 files changed

+2969
-2969
lines changed

COPYING.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ redistribute, modify and distribute modified versions."
55
------------------
66

77
Cython, which derives from Pyrex, is licensed under the Python
8-
Software Foundation License. More precisely, all modifications
8+
Software Foundation License. More precisely, all modifications
99
made to go from Pyrex to Cython are so licensed.
1010

1111
See LICENSE.txt for more details.
1212

13-
13+

Cython/Build/Dependencies.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def unquote(literal):
3636
return literals[literal[1:-1]]
3737
else:
3838
return literal
39-
39+
4040
return [unquote(item) for item in s.split(delimiter)]
4141

4242
transitive_str = object()
@@ -70,7 +70,7 @@ def line_iter(source):
7070
start = end+1
7171

7272
class DistutilsInfo(object):
73-
73+
7474
def __init__(self, source=None, exn=None):
7575
self.values = {}
7676
if source is not None:
@@ -97,7 +97,7 @@ def __init__(self, source=None, exn=None):
9797
value = getattr(exn, key, None)
9898
if value:
9999
self.values[key] = value
100-
100+
101101
def merge(self, other):
102102
if other is None:
103103
return self
@@ -114,7 +114,7 @@ def merge(self, other):
114114
else:
115115
self.values[key] = value
116116
return self
117-
117+
118118
def subs(self, aliases):
119119
if aliases is None:
120120
return self
@@ -140,9 +140,9 @@ def subs(self, aliases):
140140

141141
def strip_string_literals(code, prefix='__Pyx_L'):
142142
"""
143-
Normalizes every string literal to be of the form '__Pyx_Lxxx',
143+
Normalizes every string literal to be of the form '__Pyx_Lxxx',
144144
returning the normalized code and a mapping of labels to
145-
string literals.
145+
string literals.
146146
"""
147147
new_code = []
148148
literals = {}
@@ -156,7 +156,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
156156
double_q = code.find('"', q)
157157
q = min(single_q, double_q)
158158
if q == -1: q = max(single_q, double_q)
159-
159+
160160
# We're done.
161161
if q == -1 and hash_mark == -1:
162162
new_code.append(code[start:])
@@ -181,7 +181,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
181181
start = q
182182
else:
183183
q += 1
184-
184+
185185
# Process comment.
186186
elif -1 != hash_mark and (hash_mark < q or q == -1):
187187
end = code.find('\n', hash_mark)
@@ -212,7 +212,7 @@ def strip_string_literals(code, prefix='__Pyx_L'):
212212
new_code.append(code[start:end])
213213
start = q
214214
q += len(in_quote)
215-
215+
216216
return "".join(new_code), literals
217217

218218

@@ -245,16 +245,16 @@ def parse_dependencies(source_filename):
245245

246246

247247
class DependencyTree(object):
248-
248+
249249
def __init__(self, context):
250250
self.context = context
251251
self._transitive_cache = {}
252-
252+
253253
#@cached_method
254254
def parse_dependencies(self, source_filename):
255255
return parse_dependencies(source_filename)
256256
parse_dependencies = cached_method(parse_dependencies)
257-
257+
258258
#@cached_method
259259
def cimports_and_externs(self, filename):
260260
cimports, includes, externs = self.parse_dependencies(filename)[:3]
@@ -272,10 +272,10 @@ def cimports_and_externs(self, filename):
272272
print("Unable to locate '%s' referenced from '%s'" % (filename, include))
273273
return tuple(cimports), tuple(externs)
274274
cimports_and_externs = cached_method(cimports_and_externs)
275-
275+
276276
def cimports(self, filename):
277277
return self.cimports_and_externs(filename)[0]
278-
278+
279279
#@cached_method
280280
def package(self, filename):
281281
dir = os.path.dirname(filename)
@@ -284,13 +284,13 @@ def package(self, filename):
284284
else:
285285
return ()
286286
package = cached_method(package)
287-
287+
288288
#@cached_method
289289
def fully_qualifeid_name(self, filename):
290290
module = os.path.splitext(os.path.basename(filename))[0]
291291
return '.'.join(self.package(filename) + (module,))
292292
fully_qualifeid_name = cached_method(fully_qualifeid_name)
293-
293+
294294
def find_pxd(self, module, filename=None):
295295
if module[0] == '.':
296296
raise NotImplementedError("New relative imports.")
@@ -301,7 +301,7 @@ def find_pxd(self, module, filename=None):
301301
return pxd
302302
return self.context.find_pxd_file(module, None)
303303
find_pxd = cached_method(find_pxd)
304-
304+
305305
#@cached_method
306306
def cimported_files(self, filename):
307307
if filename[-4:] == '.pyx' and os.path.exists(filename[:-4] + '.pxd'):
@@ -316,41 +316,41 @@ def cimported_files(self, filename):
316316
print("\n\t".join(b))
317317
return tuple(self_pxd + filter(None, [self.find_pxd(m, filename) for m in self.cimports(filename)]))
318318
cimported_files = cached_method(cimported_files)
319-
319+
320320
def immediate_dependencies(self, filename):
321321
all = list(self.cimported_files(filename))
322322
for extern in sum(self.cimports_and_externs(filename), ()):
323323
all.append(os.path.normpath(os.path.join(os.path.dirname(filename), extern)))
324324
return tuple(all)
325-
325+
326326
#@cached_method
327327
def timestamp(self, filename):
328328
return os.path.getmtime(filename)
329329
timestamp = cached_method(timestamp)
330-
330+
331331
def extract_timestamp(self, filename):
332332
# TODO: .h files from extern blocks
333333
return self.timestamp(filename), filename
334-
334+
335335
def newest_dependency(self, filename):
336336
return self.transitive_merge(filename, self.extract_timestamp, max)
337-
337+
338338
def distutils_info0(self, filename):
339339
return self.parse_dependencies(filename)[3]
340-
340+
341341
def distutils_info(self, filename, aliases=None, base=None):
342342
return (self.transitive_merge(filename, self.distutils_info0, DistutilsInfo.merge)
343343
.subs(aliases)
344344
.merge(base))
345-
345+
346346
def transitive_merge(self, node, extract, merge):
347347
try:
348348
seen = self._transitive_cache[extract, merge]
349349
except KeyError:
350350
seen = self._transitive_cache[extract, merge] = {}
351351
return self.transitive_merge_helper(
352352
node, extract, merge, seen, {}, self.cimported_files)[0]
353-
353+
354354
def transitive_merge_helper(self, node, extract, merge, seen, stack, outgoing):
355355
if node in seen:
356356
return seen[node], None

Cython/Build/Inline.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def safe_type(arg, context=None):
8888
return '%s.%s' % (base_type.__module__, base_type.__name__)
8989
return 'object'
9090

91-
def cython_inline(code,
91+
def cython_inline(code,
9292
get_type=unsafe_type,
9393
lib_dir=os.path.expanduser('~/.cython/inline'),
9494
cython_include_dirs=['.'],
@@ -252,14 +252,14 @@ def get_body(source):
252252
else:
253253
return source[ix+1:]
254254

255-
# Lots to be done here... It would be especially cool if compiled functions
255+
# Lots to be done here... It would be especially cool if compiled functions
256256
# could invoke each other quickly.
257257
class RuntimeCompiledFunction(object):
258258

259259
def __init__(self, f):
260260
self._f = f
261261
self._body = get_body(inspect.getsource(f))
262-
262+
263263
def __call__(self, *args, **kwds):
264264
all = getcallargs(self._f, *args, **kwds)
265265
return cython_inline(self._body, locals=self._f.func_globals, globals=self._f.func_globals, **all)

Cython/Build/Tests/TestInline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_globals(self):
3232
self.assertEquals(inline("return global_value + 1", **test_kwds), global_value + 1)
3333

3434
if has_numpy:
35-
35+
3636
def test_numpy(self):
3737
import numpy
3838
a = numpy.ndarray((10, 20))

0 commit comments

Comments
 (0)