-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Add skeleton for fixing multiline from imports * Rename "Contination" to "PendingFix" * Add fix for the multiline from import problem * Add fix for multiline imports without from * Add fix for multiline relative imports * Fix other edge cases of multiline import Such as: - leading/trailing commas/line continuation - try/except - semicolon - empty imports as result In some cases the approach of "not changing anything if it is too risk" was adopted (as already happens in other parts of the code). * Deal with CLI options in FilterMultilineImport * Simplify multiline imports by ignoring comments Unfortunately treating inline comments inside imports increases the complexity in the implementation. This change reduces complexity by refusing to change multiline import statements that contain comments. This approach is also used in other parts of the code. * Simplify logic in multiline imports ... By using the existing code as a template. * Fix docstrings according to pydocstyle * Remove unused itertools * Remove solved TODO comment * Add examples from issue #8 and fix edge cases
- Loading branch information
1 parent
22b0a69
commit e14b5c3
Showing
2 changed files
with
705 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.