mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-17183 Heuristically determine when incomplete docstring captures another declaration
To do so I search for the line inside a docstring that starts with either "def " or "class " and has indentation less than that of opening docstring quotes.
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
def f():
|
||||
"""
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
|
||||
|
||||
class Class:
|
||||
"""
|
||||
bar
|
||||
"""
|
||||
@@ -0,0 +1,8 @@
|
||||
def f():
|
||||
"""<caret>
|
||||
|
||||
|
||||
class Class:
|
||||
"""
|
||||
bar
|
||||
"""
|
||||
@@ -0,0 +1,12 @@
|
||||
def f():
|
||||
"""
|
||||
|
||||
Returns:
|
||||
|
||||
"""
|
||||
|
||||
|
||||
def g():
|
||||
"""
|
||||
bar
|
||||
"""
|
||||
@@ -0,0 +1,8 @@
|
||||
def f():
|
||||
"""<caret>
|
||||
|
||||
|
||||
def g():
|
||||
"""
|
||||
bar
|
||||
"""
|
||||
@@ -0,0 +1,15 @@
|
||||
def f():
|
||||
"""
|
||||
|
||||
Monospaced ``func`` and func
|
||||
|
||||
Example:
|
||||
|
||||
::
|
||||
|
||||
def func():
|
||||
pass
|
||||
|
||||
class Class():
|
||||
pass
|
||||
"""
|
||||
@@ -0,0 +1,14 @@
|
||||
def f():
|
||||
"""<caret>
|
||||
Monospaced ``func`` and func
|
||||
|
||||
Example:
|
||||
|
||||
::
|
||||
|
||||
def func():
|
||||
pass
|
||||
|
||||
class Class():
|
||||
pass
|
||||
"""
|
||||
Reference in New Issue
Block a user