我将 PyDev 与 Eclipse 一起使用,并且我有一些仅在运行时设置的属性。通常我可以像这样修复 PyDev 的错误:
obj.runtime_attr # @UndefinedVariable
然而,由于我的陈述很长,因此,对于 PEP8,多行,它看起来像这样:
some.long.statement.\
with.multiline(obj.runtime_attr).\
more()
现在我无法添加@UndefinedVariable
,因为它会中断行继续(PEP8 要求行尾注释前有两个空格)。但是,我不能把它放在行尾(它只是不起作用):
some.long.statement.\
with.multiline(obj.runtime_attr).\
more() # @UndefinedVariable
有什么方法可以让我忽略吗?这只是一个缺少的功能,您无法做到这一点吗?