Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python pep8-视觉缩进下的缩进线_Python_Eclipse_Pydev - Fatal编程技术网

Python pep8-视觉缩进下的缩进线

Python pep8-视觉缩进下的缩进线,python,eclipse,pydev,Python,Eclipse,Pydev,我在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',

我在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')
错误

如何修复此错误


注意:方法名称是伪名称,用于在eclipse中重新创建此错误。

当函数调用跨行中断时,第二个和后续参数应与第一个参数在视觉上对齐,如下所示:

show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
                                                                 'tessdlkjsdsdsdsdsdsdsdt')
show_alarm = telemetry_client_show_alarm_history_testststsststst(
    'alarm_id',
    'tessdlkjsdsdsdsdsdsdsdt')
如果这会产生不需要的结果,例如行太长,则可以在第一个参数之前添加换行符,如下所示:

show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
                                                                 'tessdlkjsdsdsdsdsdsdsdt')
show_alarm = telemetry_client_show_alarm_history_testststsststst(
    'alarm_id',
    'tessdlkjsdsdsdsdsdsdsdt')

当函数调用跨行中断时,第二个参数和后续参数应与第一个参数在视觉上对齐,如下所示:

show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
                                                                 'tessdlkjsdsdsdsdsdsdsdt')
show_alarm = telemetry_client_show_alarm_history_testststsststst(
    'alarm_id',
    'tessdlkjsdsdsdsdsdsdsdt')
如果这会产生不需要的结果,例如行太长,则可以在第一个参数之前添加换行符,如下所示:

show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
                                                                 'tessdlkjsdsdsdsdsdsdsdt')
show_alarm = telemetry_client_show_alarm_history_testststsststst(
    'alarm_id',
    'tessdlkjsdsdsdsdsdsdsdt')

这是一个linting警告,代码本身应该可以正常运行。这意味着缩进参数没有与封闭参数对齐,例如

show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
                                                                 'tessdlkjsdsdsdsdsdsdsdt')

另请参见

这是一个警告,代码本身应该可以正常运行。这意味着缩进参数没有与封闭参数对齐,例如

show_alarm = telemetry_client_show_alarm_history_testststsststst('alarm_id',
                                                                 'tessdlkjsdsdsdsdsdsdsdt')

另请参见

如果可以使用较短的函数名,这是最简单的解决方案。

如果可以使用较短的函数名,这是最简单的解决方案。

如果对齐,则会出现此错误“E501行太长(91>79个字符)”,然后尝试在第一个参数之前断开该行。请参阅最近对我的答案的编辑。如果我对齐,则会出现此错误“E501行太长(91>79个字符)”,然后尝试在第一个参数之前断开该行。请参阅最近对我的答案的编辑。