hundreds-carpet-28072
11/10/2022, 1:59 PMmodule_mapping={
"ansicolors": ["colors"]
}
### get ^ when given ^
bitter-ability-32190
11/10/2022, 2:14 PMhundreds-carpet-28072
11/10/2022, 2:34 PM./pants dependencies :: --filter-target-type="python_requirements"
to find imported modules but for said check to work we’d need to be able to map these back to their original package/requirement names somehowbitter-ability-32190
11/10/2022, 2:36 PMfresh-cat-90827
11/12/2022, 6:58 PMBUILD
file target:
python_requirements(name="reqs", module_mapping={"foo": ["bar", "baz"]})
You could do
$ ./pants --filter-target-type="python_requirements" peek : | jq '.[] | .module_mapping'
{
"foo": [
"bar",
"baz"
]
}
and then either do a jq
magic or probably easier to pipe to Python and get the foo
when you have bar
hundreds-carpet-28072
11/14/2022, 1:12 PM./pants dependencies
does actually do what I expected in giving the original package name, just not for a specific package being mapped. But I need to look into that further