Skip to content
GitLab
探索
项目
群组
代码片段
项目
群组
代码片段
/
帮助
帮助
支持
社区论坛
快捷键
?
提交反馈
登录
切换导航
菜单
打开侧边栏
ExternalRepo
flake8
提交
87dc65ea
提交
87dc65ea
编辑于
13年前
作者:
Tarek Ziade
浏览文件
操作
下载
电子邮件补丁
差异文件
cleanup
上级
ff8a99cd
main
pre-commit-ci-update-config
remove-statistics-count-benchmarks
7.0.0
6.1.0
6.0.0
5.0.4
5.0.3
5.0.2
5.0.1
5.0.0
4.0.1
4.0.0
3.9.2
3.9.1
3.9.0
3.8.4
3.8.3
3.8.2
3.8.1
3.8.0
3.8.0a2
3.8.0a1
3.7.9
3.7.8
3.7.7
3.7.6
3.7.5
3.7.4
3.7.3
3.7.2
3.7.1
3.7.0
3.6.0
3.5.0
3.4.1
3.4.0
3.3.0
3.2.1
3.2.0
3.1.1
3.1.0
3.1.0b2
3.1.0b1
3.0.4
3.0.3
3.0.2
3.0.1
3.0.0
3.0.0b2
3.0.0b1
2.6.2
2.6.1
2.6.0
2.5.5
2.5.4
2.5.3
2.5.2
2.5.1
2.5.0
2.4.1
2.4.0
2.3.0
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2.0
2.1.0
2.0
1.7.0
1.6.2
1.6.1
1.6
1.5
1.3.1
1.3
1.2
1.1
1.0
0.9
无相关合并请求
变更
2
Hide whitespace changes
Inline
Side-by-side
显示
2 个更改的文件
flake8/mccabe.py
+1
-1
flake8/mccabe.py
flake8/pep8.py
+2
-0
flake8/pep8.py
有
3 个添加
和
1 个删除
+3
-1
flake8/mccabe.py
+
1
-
1
浏览文件 @
87dc65ea
...
...
@@ -177,7 +177,7 @@ def get_code_complexity(code, min=7, filename='stdin'):
try
:
ast
=
compiler
.
parse
(
code
)
except
AttributeError
as
e
:
print
>>
sys
.
stderr
,
"Unable to parse %s: %s"
%
(
filename
,
e
)
print
>>
sys
.
stderr
,
"Unable to parse %s: %s"
%
(
filename
,
e
)
return
0
visitor
=
PathGraphingAstVisitor
()
...
...
This diff is collapsed.
Click to expand it.
flake8/pep8.py
+
2
-
0
浏览文件 @
87dc65ea
...
...
@@ -721,12 +721,14 @@ def python_3000_backticks(logical_line):
if
''
==
''
.
encode
():
# Python 2: implicit encoding.
def
readlines
(
filename
):
return
open
(
filename
).
readlines
()
else
:
# Python 3: decode to latin-1.
# This function is lazy, it does not read the encoding declaration.
# XXX: use tokenize.detect_encoding()
def
readlines
(
filename
):
# NOQA
return
open
(
filename
,
encoding
=
'latin-1'
).
readlines
()
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
支持
Markdown
0%
请重试
或
添加新附件
.
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
菜单
探索
项目
群组
代码片段