Skip to content
GitLab
探索
项目
群组
代码片段
项目
群组
代码片段
/
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录
切换导航
菜单
打开侧边栏
ExternalRepo
isort
提交
6a946627
提交
6a946627
编辑于
5年前
作者:
Timothy Crosley
浏览文件
操作
下载
电子邮件补丁
差异文件
Fix issue #807: no sections with future
上级
b3412e19
main
characterization-test-float-to-top-in-sort-on-off
ci/general-ci-improvements
ci/release-workflow
dependabot/pip/black-24.3.0
dependabot/pip/idna-3.7
dependabot/pip/jinja2-3.1.4
dev-req-refresh
feature/fix-as-imports-no-section
feature/fix-issue-807
filter-out-pytest-warnings
hotfix-5.11.5
improve-test-coverage
issue/1208-namespace-import-from-support
issue/1321/combine_as_comments
issue/1447/stdin-pipe-exception-deprecated-arguments
issue/1453/float-to-top-errors-with-empty-file
issue/1454/fix-endless-import-sorting
issue/1461/respect-quiet-in-api
issue/1475/improve-unsupported-config-option-error-reporting
issue/1511/show-files-via-cli-support
issue/1525/bug-early-warnings-cant-be-surpressed-with-quiet
issue/1548/empty-line-added-after-import-skip
issue/1566
issue/1582-dont-follow-links
issue/1596
issue/1612
issue/1639
issue/1792-fix-literal-sort-at-top
issue/710-settings-path
prepare-release-6.0.0
5.13.2
5.13.1
5.13.0
5.12.0
5.11.5
5.11.4
5.11.3
5.11.2
5.11.1
5.11.0
5.10.1
5.10.0
5.9.3
5.9.2
5.9.1
5.9.0
5.8.0
5.7.0
5.6.4
5.6.3
5.6.2
5.6.1
5.6.0
5.5.5
5.5.4
5.5.3
5.5.2
5.5.1
5.5.0
5.4.2
5.4.1
5.4.0
5.3.2
5.3.1
5.3.0
5.2.2
5.2.1
5.2.0
5.1.4
5.1.3
5.1.2
5.1.1
5.1.0
5.0.9
5.0.8
5.0.7
5.0.6
5.0.5
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
v5.11.3
无相关合并请求
变更
1
Hide whitespace changes
Inline
Side-by-side
显示
1 个更改的文件
isort/output.py
+5
-1
isort/output.py
有
5 个添加
和
1 个删除
+5
-1
isort/output.py
+
5
-
1
浏览文件 @
6a946627
...
...
@@ -34,12 +34,16 @@ def sorted_imports(
if
config
.
no_sections
:
parsed
.
imports
[
"no_sections"
]
=
{
"straight"
:
[],
"from"
:
{}}
base_sections
:
Tuple
[
str
,
...]
=
()
for
section
in
sections
:
if
section
==
"FUTURE"
:
base_sections
=
(
"FUTURE"
,)
continue
parsed
.
imports
[
"no_sections"
][
"straight"
].
extend
(
parsed
.
imports
[
section
].
get
(
"straight"
,
[])
)
parsed
.
imports
[
"no_sections"
][
"from"
].
update
(
parsed
.
imports
[
section
].
get
(
"from"
,
{}))
sections
=
(
"no_sections"
,)
sections
=
base_sections
+
(
"no_sections"
,)
output
:
List
[
str
]
=
[]
pending_lines_before
=
False
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
支持
Markdown
0%
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
菜单
探索
项目
群组
代码片段