Comments (10)
The --config-file
flag is available since 0.10.0
, thanks @HoverHell ! :)
I see now what you mean, and it makes sense too. The loading of the variables would be in order of preference:
pyproject.toml
of the repository- Global config in
~/.config/autoimport/config.toml
- Autoimport defaults.
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
from autoimport.
Available since 1.2.0
thanks to @Jasha10 who did a PR based on the work of @HoverHell and the awesome maison
library by @dbatten5
from autoimport.
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
from autoimport.
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 )
from autoimport.
Adding the --config-file
flag makes sense, but sorry, I still don't understand why would you need a wrapper. Can you help me understand what's missing in the current implementation?
If we add the --config-file
may I close the other PR you created?
from autoimport.
why would you need a wrapper
It's still missing a global (home-dir) config.
may I close the other PR you created
yes
from autoimport.
+1 for a --config-file
flag :)
from autoimport.
@HoverHell, by a global (home-dir) config, you mean something like $HOME/.autoimport.toml
?
from autoimport.
from autoimport.
PR with the global config
-> #172
from autoimport.
Related Issues (20)
- Preserve line endings HOT 2
- Pre-generate module symbol list HOT 1
- Extra blank lines after imports are removed HOT 2
- Stdout of unmodified script should be returned even if autoimport fails to resolve libraries HOT 3
- crashes with `ValueError` when the import to remove appears twice HOT 2
- Flag to skip for `__init__.py` files HOT 3
- [Bug] handling top-level `if TYPE_CHECKING: ...` block HOT 3
- Maintenance mode. Help needed! HOT 1
- Add `--ignore-init-modules` to configurable options HOT 3
- Move away from the `xdg` package HOT 5
- Bug: Interaction between `TYPE_CHECKING` and star import HOT 1
- Bug: unused multiline import statement trigges re.error HOT 1
- Bug: Import of type "from module import (func1, func2)" can trigger ValueError HOT 1
- Mac arm64 issues HOT 1
- Option to disable "move-to-top" feature HOT 3
- Broken syntax with multiline, function-local imports HOT 3
- Allow fixing unicode files with non-ASCII characters on Windows HOT 1
- Deleted dependency detected HOT 1
- Pull Request maintenance only :( HOT 1
- maison 2.0.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autoimport.