Skip to content

Commit cd41595

Browse files
committed
-
1 parent 438b831 commit cd41595

File tree

8 files changed

+22
-20
lines changed

8 files changed

+22
-20
lines changed

python_toolbox/cute_iter_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def iter_with(iterable, context_manager):
168168

169169
def izip_longest(*iterables, **kwargs):
170170
'''
171-
izip_longest(iter1 [,iter2 [...]], [fillvalue=None]) --> izip_longest object
171+
izip_longest(iter1 [,iter2 [...]], [fillvalue=None]) -> izip_longest object
172172
173173
Return an `izip_longest` object whose `.next()` method returns a `tuple`
174174
where the i-th element comes from the i-th iterable argument. The `.next()`

python_toolbox/emitters/emitter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ def _recalculate_total_callable_outputs_recursively(self):
149149
# inputs `A` and `B`. `A` has input `B`. A callable output `func` was
150150
# just removed from `self`, so this function got called. We update the
151151
# cache here, then take the first input layer, which is `A` and `B` in
152-
# some order. Say `B` is first. Now, we do `recalculate` on `B`, but `A`
153-
# still got the cache with `func`, and `B` will take that. I need to
154-
# test this.
152+
# some order. Say `B` is first. Now, we do `recalculate` on `B`, but
153+
# `A` still got the cache with `func`, and `B` will take that. I need
154+
# to test this.
155155
#
156156
# I have an idea how to solve it: In the getter of the cache, check the
157157
# cache exists, otherwise rebuild. The reason we didn't do it up to now

python_toolbox/emitters/emitter_system/emitter_system.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ class EmitterSystem(object):
3535
3636
`EmitterSystem` offers a few advantages over using plain emitters.
3737
38-
There are the `bottom_emitter` and `top_emitter`, which allow, respectively,
39-
to keep track of each `emit`ting that goes on, and to generate an `emit`ting
40-
that affects all emitters in the system.
38+
There are the `bottom_emitter` and `top_emitter`, which allow,
39+
respectively, to keep track of each `emit`ting that goes on, and to
40+
generate an `emit`ting that affects all emitters in the system.
4141
4242
The `EmitterSystem` also offers a context manager,
4343
`.freeze_cache_rebuilding`. When you do actions using this context manager,
4444
the emitters will not rebuild their cache when changing their
4545
inputs/outputs. When the outermost context manager has exited, all the
4646
caches for these emitters will get rebuilt.
4747
'''
48-
# possible future idea: there is the idea of optimizing by cutting redundant
49-
# links between boxes. I'm a bit suspicious of it. The next logical step is
50-
# to make inputs and outputs abstract.
48+
# possible future idea: there is the idea of optimizing by cutting
49+
# redundant links between boxes. I'm a bit suspicious of it. The next
50+
# logical step is to make inputs and outputs abstract.
5151
def __init__(self):
5252

5353
self.emitters = set()

python_toolbox/infinity.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ def __eq__(self, other):
171171

172172
elif isinstance(other, float):
173173
# We're checking to see if `other` is equal to `float('inf')` or
174-
# `-float('inf')`. But we must `try` it carefully, because in Python
175-
# 2.5 there is no `float('inf')`.
174+
# `-float('inf')`. But we must `try` it carefully, because in
175+
# Python 2.5 there is no `float('inf')`.
176176
#
177177
# Todo: It seems this takes precedence over `float.__eq__`,
178178
# fortunately. How come this happens?

test_python_toolbox/test_address_tools/test_describe.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ def test_on_locally_defined_class():
3131

3232
if python_toolbox.__version_info__ <= (0, 1, 0):
3333
raise nose.SkipTest("This test doesn't pass in `python_toolbox` "
34-
"version 0.1 and below, because `describe` doesn't "
35-
"support nested classes yet.")
34+
"version 0.1 and below, because `describe` :"
35+
"doesn't support nested classes yet.")
3636

3737
result = describe(A.B)
3838
assert result == prefix + 'A.B'

test_python_toolbox/test_persistent/test_cross_process_persistent.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ def __init__(self):
8989
'''Dict mapping from ints to CPPs.'''
9090

9191
def run(self):
92-
for number, item in queue_tools.iterate(self.work_queue, block=True):
92+
for number, item in queue_tools.iterate(self.work_queue,
93+
block=True):
9394
if number in self.library:
9495
assert self.library[number] is item
95-
other_items = [value for (key, value) in self.library.items()
96-
if key != number]
96+
other_items = [value for (key, value) in
97+
self.library.items() if key != number]
9798
for other_item in other_items:
9899
assert other_item is not item
99100
self.processed_items_queue.put(item)

test_python_toolbox/test_random_tools/test_random_partitions.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def assert_correct_members(partitions):
2828
assert_correct_members(partitions)
2929

3030
for n_partitions in range(1, len(r)):
31-
partitions = random_tools.random_partitions(r, n_partitions=n_partitions)
31+
partitions = random_tools.random_partitions(r,
32+
n_partitions=n_partitions)
3233
assert len(partitions) == n_partitions
3334
assert_correct_members(partitions)
3435

test_python_toolbox/third_party/forked_mapping_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,8 @@ def test_pop(self):
534534
d = self._empty_mapping()
535535
k, v = 'abc', 'def'
536536

537-
# verify longs/ints get same value when key > 32 bits (for 64-bit archs)
538-
# see SF bug #689659
537+
# verify longs/ints get same value when key > 32 bits (for 64-bit
538+
# archs) see SF bug #689659
539539
x = 4503599627370496L
540540
y = 4503599627370496
541541
h = self._full_mapping({x: 'anything', y: 'something else'})

0 commit comments

Comments
 (0)