我在我的 eclipse 上运行一个 pep-8 并且遇到了这个错误并且不知道如何修复它..
'''
Created on Aug 31, 2015
@author: testuser
'''
def telemetry_client_show_alarm_history_testststsststst(id1, name):
pass
show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
'tessdlkjsdsdsdsdsdsdsdt')
错误
E128 continuation line under-indented for visual indent
我该如何解决这个错误?
注意:方法名称是虚拟名称,用于在 eclipse 中重现此错误..
最佳答案
当函数调用跨行中断时,第二个和后续参数在视觉上应与第一个参数对齐,如下所示:
show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
'tessdlkjsdsdsdsdsdsdsdt')
如果这会产生不良结果,例如行太长,您可以在第一个参数之前添加一个换行符,如下所示:
show_alarm = telemetry_client_show_alarm_history_testststsststst(
'alarm_id',
'tessdlkjsdsdsdsdsdsdsdt')
关于python - pep8- 视觉缩进缩进下的续行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32315995/