https://pantsbuild.org/ logo
#general
Title
# general
a

average-breakfast-91545

03/06/2023, 10:51 PM
I'm running pants 2.15. From what I can see, there's a default module mapping for
django_ninja
=>
ninja
. Pants knows I have django-ninja as a dep (
pants list .
includes
//:root#django-ninja
), but I'm getting warnings
Pants cannot infer owners for the following imports in the target: ninja
, and pants test fails to import the module
ninja
. Am I missing something obvious? It seems like this is supposed to work out of the box.
b

broad-processor-92400

03/06/2023, 10:57 PM
It looks like that mapping was added in 2.16 (currently in dev), so you'll need to temporarily add your own. E.g.
module_mapping={"django-ninja": ["ninja"]}
field in the
python_requirements
a

average-breakfast-91545

03/06/2023, 10:57 PM
👍 thanks, I just checked the release date of 2.15 and assumed it covered that commit. MY bad!
b

broad-processor-92400

03/06/2023, 10:58 PM
No worries! I had to check the tags, because I had the same thought about the dates. The 2.15 release cycle over the year-end period was a bit longer than usual, I think
👍 1
5 Views