Fix typos when forwarding arguments to traverse_edges (#29261)
A few calls use `deptypes=...` instead of `deptype=...`
This commit is contained in:
		
				
					committed by
					
						
						GitHub
					
				
			
			
				
	
			
			
			
						parent
						
							a43e3f3ffb
						
					
				
				
					commit
					8d118104c7
				
			@@ -701,7 +701,7 @@ def find_spec(spec, condition, default=None):
 | 
				
			|||||||
        visited.add(id(relative))
 | 
					        visited.add(id(relative))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Then search all other relatives in the DAG *except* spec
 | 
					    # Then search all other relatives in the DAG *except* spec
 | 
				
			||||||
    for relative in spec.root.traverse(deptypes=all):
 | 
					    for relative in spec.root.traverse(deptype='all'):
 | 
				
			||||||
        if relative is spec:
 | 
					        if relative is spec:
 | 
				
			||||||
            continue
 | 
					            continue
 | 
				
			||||||
        if id(relative) in visited:
 | 
					        if id(relative) in visited:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1189,7 +1189,7 @@ def extendee_spec(self):
 | 
				
			|||||||
        deps = []
 | 
					        deps = []
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # If the extendee is in the spec's deps already, return that.
 | 
					        # If the extendee is in the spec's deps already, return that.
 | 
				
			||||||
        for dep in self.spec.traverse(deptypes=('link', 'run')):
 | 
					        for dep in self.spec.traverse(deptype=('link', 'run')):
 | 
				
			||||||
            if dep.name in self.extendees:
 | 
					            if dep.name in self.extendees:
 | 
				
			||||||
                deps.append(dep)
 | 
					                deps.append(dep)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4272,7 +4272,7 @@ def tree(self, **kwargs):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        out = ""
 | 
					        out = ""
 | 
				
			||||||
        for d, dep_spec in self.traverse_edges(
 | 
					        for d, dep_spec in self.traverse_edges(
 | 
				
			||||||
                order='pre', cover=cover, depth=True, deptypes=deptypes):
 | 
					                order='pre', cover=cover, depth=True, deptype=deptypes):
 | 
				
			||||||
            node = dep_spec.spec
 | 
					            node = dep_spec.spec
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if prefix is not None:
 | 
					            if prefix is not None:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -974,7 +974,6 @@ def test_canonical_deptype(self):
 | 
				
			|||||||
            canonical_deptype(('foo',))
 | 
					            canonical_deptype(('foo',))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_invalid_literal_spec(self):
 | 
					    def test_invalid_literal_spec(self):
 | 
				
			||||||
 | 
					 | 
				
			||||||
        # Can't give type 'build' to a top-level spec
 | 
					        # Can't give type 'build' to a top-level spec
 | 
				
			||||||
        with pytest.raises(spack.spec.SpecParseError):
 | 
					        with pytest.raises(spack.spec.SpecParseError):
 | 
				
			||||||
            Spec.from_literal({'foo:build': None})
 | 
					            Spec.from_literal({'foo:build': None})
 | 
				
			||||||
@@ -982,3 +981,11 @@ def test_invalid_literal_spec(self):
 | 
				
			|||||||
        # Can't use more than one ':' separator
 | 
					        # Can't use more than one ':' separator
 | 
				
			||||||
        with pytest.raises(KeyError):
 | 
					        with pytest.raises(KeyError):
 | 
				
			||||||
            Spec.from_literal({'foo': {'bar:build:link': None}})
 | 
					            Spec.from_literal({'foo': {'bar:build:link': None}})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    def test_spec_tree_respect_deptypes(self):
 | 
				
			||||||
 | 
					        # Version-test-root uses version-test-pkg as a build dependency
 | 
				
			||||||
 | 
					        s = Spec('version-test-root').concretized()
 | 
				
			||||||
 | 
					        out = s.tree(deptypes='all')
 | 
				
			||||||
 | 
					        assert 'version-test-pkg' in out
 | 
				
			||||||
 | 
					        out = s.tree(deptypes=('link', 'run'))
 | 
				
			||||||
 | 
					        assert 'version-test-pkg' not in out
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user