红联Linux门户
Linux帮助

isort 4.2.12发布,Python的import排序

发布时间:2017-06-02 09:05:06来源:红联作者:baihuo
isort 4.2.12 发布了,改进如下

4.2.12 - June 1, 2017 - hotfix release

重要提示:这将是支持 Python 2.6 的最后一个版本,后续版本将仅支持 2.7+

Fixed wheel distribution bug

4.2.11 - June 1, 2017 - hotfix release

Fixed #546: Can't select y/n/c after latest update

Fixed #545: Incorrectly moves future imports above encoding comments

4.2.9 - June 1, 2017 - hotfix release

Fixed #428: Check only modifies sorting

Fixed #540: Not correctly identifying stdlib modules

4.2.8 - May 31, 2017

Added --virtual-env switch command line option

Added --enforce-whitespace option to go along with --check-only for more exact checks (issue #423)

Fixed imports with a tailing '' and no space in-between getting removed (issue #425)

Fixed issue #299: long lines occasionally not wrapped

Fixed issue #432: No longer add import inside class when class starts at top of file after encoding comment

Fixed issue #440: Added missing --use-parentheses option to command line tool and documentation

Fixed issue #496: import* imports now get successfully identified and reformatted instead of deleted

Fixed issue #491: Non ending parentheses withing single line comments no longer cause formatting issues

Fixed issue #471: Imports that wrap the maximum line length and contain comments on the last line are no longer rendered incorrectly

Fixed issue #436: Force sort within section no longer rearranges comments

Fixed issue #473: Force_to_top and force_sort_within_sections now work together

Fixed issue #484 & #472: Consistent output with imports of same spelling but different case

Fixed issue #433: No longer incorrectly add an extra new-line when comment between imports and function definition

Fixed issue #419: Path specification for skipped paths is not Unix/Windows inter-operable. Breaking Changes:

Fixed issue #511: All command line options with an underscore, have had the underscore replaced with a dash for consistency. This effects: multi-line, add-import, remove-import, force-adds, --force-single-line-imports, and length-sort.

Replaced the --enforce-whitespace option with --ignore-whitespace to restore original behavior of strict whitespace by default

isort 可自动对 Python 的 import 语句进行排序和分段。可将大量的 import 结构转成非常适合阅读的排版。提供一个命令行工具、Python 库和 Kate 插件。本次更新主要修复了大量 bug。

软件详情:https://github.com/timothycrosley/isort/tags

来自:开源中国社区
文章评论

共有 0 条评论