Hi, is it possible to figure out the source root f...
# development
r
Hi, is it possible to figure out the source root for a given python module, if you have list of source roots and modules?
e
That's exactly what dependency inference does.
h
Do you have the module as a filesystem path or as a dotted import string?
I'm assuming the latter?
r
The latter.
h
And you're doing this in a plugin? Then yeah take a look at dep inference implementation, which maps modules to source paths, and then it's easy to map source paths to their source roots.