Comments (2)
Would love to hear if there's a way to do this! I could totally guess that I missed something obvious in the API, but AddImportsVisitor in libcst is so handy and doesn't have a trivial mapping, it seems.
from fixit.
I don't think this is possible at the moment, but agreed would be very useful. Unfortunately this feature would require rethinking how the replacement API works (currently you can only declare autofixes in the node you're visiting). Or at least adding a special case for imports. @amyreese what do you think?
from fixit.
Related Issues (20)
- Support LibCst's FullyQualifiedNameProvider
- Fixit cli doesn't return non-zero exit code upon exceptions - add --exit-non-zero / --exit-zero options HOT 1
- Mechanism for testing local plugins
- Support for #lint-ignore directives
- Support for "target version"
- Do something with lint rule tags
- CLI options to select/exclude lint rules
- Alternate output formats
- Allow interactive fixes with parallel multiprocessing
- Option to apply formatting after autofixes HOT 1
- User Guide section for writing lint rules
- Migration guide for users from v0.1.4 HOT 2
- Improve type checker integration with Pyre, Mypy
- Tests fail with ValueError when using FullRepoManager
- no_assert_equals is incomplete HOT 1
- Update tests and contributor guide with docs generation
- Consider loading local rules from outside project config
- Config overrides load local rules from wrong path HOT 1
- Method to warmup cache for providers/rules in parent process before forking
- Fixit only applies a single autofix
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 fixit.