-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a config file with example imports #169
Comments
Hi @HoverHell , thank you for taking the time to open an issue. Recently @Jasha10 added support for local configuration, it has been documented here, please take a look and tell me if this will fulfill your use case |
I can work around it, with a wrapper like this: https://gist.github.com/HoverHell/b479c566960d91284999f60969bc30f1 However, at the very least that would require config path argument (e.g. #171 ) |
Adding the If we add the |
It's still missing a global (home-dir) config.
yes |
+1 for a |
@HoverHell, by a global (home-dir) config, you mean something like |
Yes (or, better yet, a `~/.config/autoimport/config.toml`) that would be read by default (unless an extra flag like `--no-global-config` is specified).
|
The I see now what you mean, and it makes sense too. The loading of the variables would be in order of preference:
I'm closing #170 as it no longer applies. But if you want to make a PR with the global config, I'll be happy to merge it |
-> #172 |
Available since |
Description
It would be useful to support local conventions (such as
import datetime as dt
) and names from local modules (from mymodule.mypackage.somewhere import SomeName
).Possible Solution
Doing this requires a config; a most simple config for this would be a
py
file with example imports.Example implementation: #170
Additional context
For further consideration: an extra tool for gathering all imports from files, to build such config, to cleanup, tune, and use it.
Related Issue
Can be seen as an alternative to #39
The text was updated successfully, but these errors were encountered: