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.
|
||||
deptypes = ()
|
||||
for dep in dep_like:
|
||||
if isinstance(dep, Spec):
|
||||
spec = dep
|
||||
elif isinstance(dep, (list, tuple)):
|
||||
|
||||
if isinstance(dep, (list, tuple)):
|
||||
# Literals can be deptypes -- if there are tuples in the
|
||||
# list, they will be used as deptypes for the following Spec.
|
||||
deptypes = tuple(dep)
|
||||
continue
|
||||
else:
|
||||
spec = Spec(dep)
|
||||
|
||||
spec = dep if isinstance(dep, Spec) else Spec(dep)
|
||||
self._add_dependency(spec, deptypes)
|
||||
|
Loading…
Reference in New Issue
Block a user