I use Python and Pylance extensions in VSCode.
In my own package that I’m editing, the automatically added imports (with setting “Import Format: absolute”) look like this:
from mydirectory.myfile import myclass
However, my Python package is being consumed by a (very dumb and non-negotiable) external system that refuses to interpret it correctly unless imports are formatted specifically like:
from mypackage.mydirectory.myfile import myclass
So how can I force VSCode to auto-complete those imports in that exact format?
I tried many VSC settings related to imports, formatting, Python, Pylance, etc. already, but so far none of them did what I need. I suspect maybe some manually forced prefixes are needed? (I have only one package, so it would be fine to hardcode a prefix like that with a specific string.)