提交 bcfb0220 编辑于 作者: Aniruddha's avatar Aniruddha
浏览文件

Add check for missing parenthesis at EOF

显示 5 个添加1 个删除
+5 -1
......@@ -7,7 +7,7 @@ import isort.literal
from isort.settings import DEFAULT_CONFIG, Config
from . import output, parse
from .exceptions import FileSkipComment
from .exceptions import ExistingSyntaxErrors, FileSkipComment
from .format import format_natural, remove_whitespace
from .settings import FILE_SKIP_COMMENTS
......@@ -303,6 +303,10 @@ def process(
else:
while ")" not in stripped_line:
line = input_stream.readline()
if not line: # end of file without closing parenthesis
raise ExistingSyntaxErrors("Parenthesis is not closed")
stripped_line = line.strip().split("#")[0]
import_statement += line
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册