Skip to content
This repository has been archived by the owner on Mar 13, 2020. It is now read-only.

[DNM] Split long rewritten imports into sets of shorter ones #64

Conversation

webknjaz
Copy link
Member

@webknjaz webknjaz commented Oct 7, 2019

Only handles from ... import ... nodes.

Ref #41.

@webknjaz webknjaz added the enhancement New feature or request label Oct 7, 2019
@webknjaz webknjaz requested review from bcoca, mkrizek and jctanner October 7, 2019 13:55
@webknjaz webknjaz assigned bcoca and jctanner and unassigned bcoca Nov 13, 2019
@webknjaz webknjaz changed the title Split long rewritten imports into sets of shorter ones [DNM] Split long rewritten imports into sets of shorter ones Nov 19, 2019
@webknjaz
Copy link
Member Author

This is currently blocked by a (red)baron bug that I discovered while testing: PyCQA/redbaron#193.

@mkrizek mkrizek assigned webknjaz and unassigned jctanner Nov 20, 2019
@webknjaz webknjaz force-pushed the features/41-split-long-import-lines branch from 62f332f to 3a5d5c9 Compare January 7, 2020 21:05
@webknjaz webknjaz force-pushed the features/41-split-long-import-lines branch 3 times, most recently from ee43c14 to 37927af Compare January 16, 2020 00:15
Closes ansible-community#41

Also:
* Warn about lines being after the split
* Add warnings for rewrite skip corner cases
* Use absolute line length in check
It's a workaround for PyCQA/redbaron#190

Also:
* Ensure there's LF @ rewritten module EOL
@webknjaz webknjaz force-pushed the features/41-split-long-import-lines branch from 37927af to 84383a9 Compare January 16, 2020 00:16
@bcoca bcoca added the migrate The migration script and its deps label Feb 19, 2020
@webknjaz
Copy link
Member Author

I don't think that redbaron bug gets fixed anytime soon. We could instead use isort on the post-processing step which would be way better and easier to implement.

@webknjaz webknjaz closed this Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request migrate The migration script and its deps
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants