Spec.__init__: removed dead code (#4146)
The conditionals are repeated in the statement before _add_dependencies
This commit is contained in:
parent
b65daa93be
commit
4e44d39f1a
@ -966,15 +966,12 @@ def __init__(self, spec_like, *dep_like, **kwargs):
|
|||||||
# Spec(a, b) will copy a but just add b as a dep.
|
# Spec(a, b) will copy a but just add b as a dep.
|
||||||
deptypes = ()
|
deptypes = ()
|
||||||
for dep in dep_like:
|
for dep in dep_like:
|
||||||
if isinstance(dep, Spec):
|
|
||||||
spec = dep
|
if isinstance(dep, (list, tuple)):
|
||||||
elif isinstance(dep, (list, tuple)):
|
|
||||||
# Literals can be deptypes -- if there are tuples in the
|
# Literals can be deptypes -- if there are tuples in the
|
||||||
# list, they will be used as deptypes for the following Spec.
|
# list, they will be used as deptypes for the following Spec.
|
||||||
deptypes = tuple(dep)
|
deptypes = tuple(dep)
|
||||||
continue
|
continue
|
||||||
else:
|
|
||||||
spec = Spec(dep)
|
|
||||||
|
|
||||||
spec = dep if isinstance(dep, Spec) else Spec(dep)
|
spec = dep if isinstance(dep, Spec) else Spec(dep)
|
||||||
self._add_dependency(spec, deptypes)
|
self._add_dependency(spec, deptypes)
|
||||||
|
Loading…
Reference in New Issue
Block a user