Comments (6)
Thank you to @superDross the feature is available under 1.0.0
!!
I've decided to go with 1.0.0
because it looks like enough people is using it and the basic features are ready.
Thanks @Jasha10 @dbatten5 @JaapJoris @superDross @fsouza @HoverHell @jugmac00 @uuwaan for making it possible
from autoimport.
Hi @Jasha10, thanks for taking the time to open the issue, the behaviour described makes all the sense. Sadly, I won't be able to look into it this month as I'm a little bit overloaded.
If you can't wait and have coding skills and some time, feel free to make a pull request.
from autoimport.
autoimport
accepts many files though, so if you're in a directory, you can do autoimport *.py
. But it won't recursively search in the subdirectories, which would be ideal
from autoimport.
The above PR should facilitate the requested behavior.
I am struggling with getting this to work with mypy
. Specifically the below error:
src/autoimport/entrypoints/cli.py:38: error: Incompatible return value type (got "Tuple[Any, ...]", expected "Tuple[Any]") [return-value]
Found 1 error in 1 file (checked 6 source files)
I have been trying to resolve this for over an hour and cannot proceed with altering the types to get it to work. Any help would be appreciated.
The tests and linters are passing (at least locally) so this is the last issue before it will completely pass the pipeline.
from autoimport.
Sorry @superDross I didn't see this comment before answering to the PR, as I see from this stack overflow question the ellipsis is used in this case for :
Arbitrary-length homogeneous tuples can be expressed using one type and ellipsis, for example Tuple[int, ...]
What I understand from that is that as we don't know the number of arguments of the tuple, that is the correct function signature. you'll probably need to change it downstream too
from autoimport.
I have updated the PR and it is now passing the pipeline.
from autoimport.
Related Issues (20)
- crashes when processing some imports that have `# comments` HOT 7
- <deleted>
- Support a config file with example imports HOT 10
- Import lines with a semicolon separator are improperly formatted HOT 1
- Python `SyntaxError` when removing last import from parenthetical import ... from statement HOT 3
- File modification time updates even if autoimport does not change file HOT 4
- Do not reformat code lines that end with `# fmt: skip` HOT 1
- Add support for `python3 -m autoimport` invocation HOT 2
- Import objects by mimicking other modules HOT 2
- `typing.Literal` can cause false-positive import HOT 3
- 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
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.