8000 Expand unclear one-line implicit conditional statement · Powercoder64/ffmpeg-python@ea90d91 · GitHub
[go: up one dir, main page]

Skip to content

Commit ea90d91

Browse files
committed
Expand unclear one-line implicit conditional statement
1 parent df9bd73 commit ea90d91

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ffmpeg/nodes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
from __future__ import unicode_literals
2-
3-
import warnings
4-
52
from .dag import KwargReprNode
63
from ._utils import escape_chars, get_hash_int
74
from builtins import object
@@ -199,7 +196,11 @@ def __init__(self, *args, **kwargs):
199196
# "1+" is for `self`
200197
argc = 1 + len(args) + len(kwargs)
201198

202-
first_arg = "old_node" in kwargs and kwargs["old_node"] or args[0]
199+
first_arg = None
200+
if "old_node" in kwargs:
201+
first_arg = kwargs["old_node"]
202+
elif len(args) > 0:
203+
first_arg = args[0]
203204

204205
if argc == _get_arg_count(self.__init_fromnode__) and type(first_arg) == type(self):
205206
self.__init_fromnode__(*args, **kwargs)

0 commit comments

Comments
 (0)
0