Comments (2)
Hi @nyuszika7h thanks for taking the time to open the issue. I see your point and agree it should be fixed.
Sadly I don't have time to implement this on my own, but if anyone is interested in contributing I think the easier way to do it is by implementing some logic when the different parts of the code are joined so that if the self.code
starts with def
or class
it should add a new \n
from autoimport.
Available since 1.3.1
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
- 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.