8000 Futurize · Powercoder64/ffmpeg-python@4640ada · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 4640ada

Browse files
committed
Futurize
1 parent 7b2d8b6 commit 4640ada

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

ffmpeg/_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def _allocate_filter_stream_names(filter_nodes, outgoing_edge_maps, stream_name_
6767
stream_count = 0
6868
for upstream_node in filter_nodes:
6969
outgoing_edge_map = outgoing_edge_maps[upstream_node]
70-
for upstream_label, downstreams in outgoing_edge_map.items():
70+
for upstream_label, downstreams in list(outgoing_edge_map.items()):
7171
if len(downstreams) > 1:
7272
# TODO: automatically insert `splits` ahead of time via graph transformation.
7373
raise ValueError('Encountered {} with multiple outgoing edges with same upstream label {!r}; a '

ffmpeg/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_stream_map(stream_spec):
5454

5555
def get_stream_map_nodes(stream_map):
5656
nodes = []
57-
for stream in stream_map.values():
57+
for stream in list(stream_map.values()):
5858
if not isinstance(stream, Stream):
5959
raise TypeError('Expected Stream; got {}'.format(type(stream)))
6060
nodes.append(stream.node)
@@ -157,7 +157,7 @@ def _get_filter(self, outgoing_edges):
157157

158158
out_args = [escape_chars(x, '\\\'=:') for x in args]
159159
out_kwargs = {}
160-
for k, v in kwargs.items():
160+
for k, v in list(kwargs.items()):
161161
k = escape_chars(k, '\\\'=:')
162162
v = escape_chars(v, '\\\'=:')
163163
out_kwargs[k] = v

ffmpeg/tests/test_ffmpeg.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import unicode_literals
22

3+
from builtins import bytes
4+
from builtins import range
35
import ffmpeg
46
import os
57
import pytest
@@ -171,7 +173,7 @@ def _get_drawtext_font_repr(font):
171173
'=': 2,
172174
'\n': 0,
173175
}
174-
for ch, expected_backslash_count in expected_backslash_counts.items():
176+
for ch, expected_backslash_count in list(expected_backslash_counts.items()):
175177
expected = '{}{}'.format('\\' * expected_backslash_count, ch)
176178
actual = _get_drawtext_font_repr(ch)
177179
assert expected == actual
@@ -205,7 +207,7 @@ def _get_drawtext_text_repr(text):
205207
'=': 2,
206208
'\n': 0,
207209
}
208-
for ch, expected_backslash_count in expected_backslash_counts.items():
210+
for ch, expected_backslash_count in list(expected_backslash_counts.items()):
209211
expected = '{}{}'.format('\\' * expected_backslash_count, ch)
210212
actual = _get_drawtext_text_repr(ch)
211213
assert expected == actual

0 commit comments

Comments
 (0)
0