<#21191 Dependency inference for `resources` loade...
# github-notifications
c
#21191 Dependency inference for `resources` loaded via `importlib.resources.files` Issue created by grihabor The problem I'm using `importlib.resources.files` to load resources from python. I'd like to have dependency inference support for
resource
targets I load. The solution It would be nice to have the support implemented in rust. Specifically, I want the
anchor
argument to work with an import: import my_package from importlib.resources import files files(my_package).joinpath('path/to/my_resource.txt') and `__package__`: from importlib.resources import files files(package).joinpath('path/to/my_resource.txt') Alternatives The support could be added in python, but it will be slow and it would duplicate the AST parsing and analysis. pantsbuild/pants