如何在生成代码文档时删除意外缩进警告的原因?

问题描述:

有问题的文件代码是一个方法的开头:如何在生成代码文档时删除意外缩进警告的原因?

""" 
Gtk.EventBox::button-release-event signal handler. 
:param widget: The clicked widget (The Gtk.EventBox). 
:param event: Gdk.EventButton object with information regarding 
     the event. 
:param user_data: The Gtk.LinkButton that should be opened when 
     the Gtk.EventBox is clicked. 
:return: None 
""" 

的警告是:

C:/msys64/home/hope/python+gtk/test/main.py:docstring of main.Builder.advertisem 
ent_clicked:4: WARNING: Unexpected indentation. 
C:/msys64/home/hope/python+gtk/test/main.py:docstring of main.Builder.advertisem 
ent_clicked:5: WARNING: Block quote ends without a blank line; unexpected uninde 
nt. 

可以做些什么来消除这些警告和他们的事业(县)?

只需添加一个空行的方法的总结描述后,该参数的描述之前:如果你得到一个狮身人面像建造

""" 
Gtk.EventBox::button-release-event signal handler. 

:param widget: The clicked widget (The Gtk.EventBox). 
:param event: Gdk.EventButton object with information regarding 
     the event. 
:param user_data: The Gtk.LinkButton that should be opened when 
     the Gtk.EventBox is clicked. 
:return: None 
""" 

Here你可以找到这个建议错误,说“意外的缩进”,它 可能是因为狮身人面像期待一个空行,如 文字块。你的路线可能包裹了狮身人面像并使其困惑。在 这种情况下,尽管将 延伸到您的窗口边缘以外,请尝试将文本拉到上一行。或者,您可以按 输入以转到下一行,但务必缩进新行上的文本。