Re adding to default_module_mapping: I use `oslo.c...
# development
p
Re adding to default_module_mapping: I use
oslo.config
, so I'm adding that. But there are a bunch of other
oslo.*
packages that follow the same pattern. I figure I can just add all of them. Or should I only add the ones I need?
h
if you're down for it, I think it's useful to add them all! I used to think "we should only add if it's 100+ stars on Github", but there's little downside to having more in the mapping...Given modern machines, the extra couple bytes to store more entries seems like not a big deal
p
Cool. PR forthcoming ...
several that I'm adding have a lot less than 100 stars 😛 oslo might (actually I don't think oslo is on Github, they self host their repos Ithink, so I guess that's moot).
Wait, what? https://github.com/pantsbuild/pants/actions/runs/3347720623/jobs/5547265073#step:11:362 It says I need to use
oslo-config
instead of
oslo.config
, but why? The package name is
oslo.config
b
We could also make the rules smarter (like having transformer functions for known NS packages) if it becomes hairy
p
In this case it wasn't even a namespace package. You install
oslo.config
and import
oslo_config
. I adjusted my PR to use the dash.
b
Ah well if the names are well-formed a transformer function is still useful. But also potentially dangerous 🤷‍♂️