support for class and instance attributes in Ctrl-Q

This commit is contained in:
Dmitry Jemerov
2011-05-02 19:43:12 +02:00
parent bab8754085
commit 19ca87905a
8 changed files with 71 additions and 3 deletions

View File

@@ -0,0 +1 @@
<html><body>Class attribute <b><code>the_attr</code></b> of class <a href="psi_element://#class#"><code>C</code></a><br><code>The&nbsp;documentation&nbsp;for&nbsp;the&nbsp;attribute.&nbsp;</code></body></html>

View File

@@ -0,0 +1,6 @@
class C:
the_attr = ""
""" The documentation for the attribute. """
def foo(self):
print self.<the_ref>the_attr

View File

@@ -0,0 +1 @@
<html><body>Instance attribute <b><code>foo</code></b> of class <a href="psi_element://#class#"><code>C</code></a><br><code>The&nbsp;docstring&nbsp;for&nbsp;the&nbsp;attribute&nbsp;foo.&nbsp;</code></body></html>

View File

@@ -0,0 +1,7 @@
class C:
def __init__(self):
self.foo = "Foo"
""" The docstring for the attribute foo. """
def bar(self):
print self.<the_ref>foo