Import module with alias
- Dominant language
- Python
- Stars
- 2.2k
- Forks
- 122
- Avg merge
- 5d 10h
- Merged PRs (30d)
- 2
Description
A project I am working on has many modules and significant module depth. I would like to configure parameters in a number of functions and classes throughout the project using a gin file located in the root directory.
For a function `foo` located in module `a.b.c.d` I would like to set a number of function arguments. For module names longer than single letters, it seems a bit overwhelming to write the whole module path for each argument. Instead, I would like to import the module using an alias.
```
# Found in gin file
import a.b.c.d as m
m.foo.x = 4
m.foo.y = 2
```
Doing so gives me this error
```
^
SyntaxError: Expected newline.
```
I assume that this failure is because the parser does not currently support module aliases.
Contributor guide
Assessment
This issue has not been assessed yet.