]> git.madduck.net Git - etc/vim.git/blob - tests/data/docstring.py

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

fix some docstring crashes (#1593)
[etc/vim.git] / tests / data / docstring.py
1 class MyClass:
2   """ Multiline
3   class docstring
4   """
5
6   def method(self):
7     """Multiline
8     method docstring
9     """
10     pass
11
12
13 def foo():
14   """This is a docstring with             
15   some lines of text here
16   """
17   return
18
19
20 def bar():
21   '''This is another docstring
22   with more lines of text
23   '''
24   return
25
26
27 def baz():
28   '''"This" is a string with some
29   embedded "quotes"'''
30   return
31
32
33 def troz():
34         '''Indentation with tabs
35         is just as OK
36         '''
37         return
38
39
40 def zort():
41         """Another
42         multiline
43         docstring
44         """
45         pass
46
47 def poit():
48   """
49   Lorem ipsum dolor sit amet.       
50
51   Consectetur adipiscing elit:
52    - sed do eiusmod tempor incididunt ut labore
53    - dolore magna aliqua
54      - enim ad minim veniam
55      - quis nostrud exercitation ullamco laboris nisi
56    - aliquip ex ea commodo consequat
57   """
58   pass
59
60
61 def under_indent():
62   """
63   These lines are indented in a way that does not
64 make sense.
65   """
66   pass
67
68
69 def over_indent():
70   """
71   This has a shallow indent
72     - But some lines are deeper
73     - And the closing quote is too deep
74     """
75   pass
76
77
78 def single_line():
79     """But with a newline after it!
80
81     """
82     pass
83
84 # output
85
86 class MyClass:
87     """Multiline
88     class docstring
89     """
90
91     def method(self):
92         """Multiline
93         method docstring
94         """
95         pass
96
97
98 def foo():
99     """This is a docstring with
100     some lines of text here
101     """
102     return
103
104
105 def bar():
106     """This is another docstring
107     with more lines of text
108     """
109     return
110
111
112 def baz():
113     '''"This" is a string with some
114     embedded "quotes"'''
115     return
116
117
118 def troz():
119     """Indentation with tabs
120     is just as OK
121     """
122     return
123
124
125 def zort():
126     """Another
127     multiline
128     docstring
129     """
130     pass
131
132
133 def poit():
134     """
135     Lorem ipsum dolor sit amet.
136
137     Consectetur adipiscing elit:
138      - sed do eiusmod tempor incididunt ut labore
139      - dolore magna aliqua
140        - enim ad minim veniam
141        - quis nostrud exercitation ullamco laboris nisi
142      - aliquip ex ea commodo consequat
143     """
144     pass
145
146
147 def under_indent():
148     """
149       These lines are indented in a way that does not
150     make sense.
151     """
152     pass
153
154
155 def over_indent():
156     """
157     This has a shallow indent
158       - But some lines are deeper
159       - And the closing quote is too deep
160     """
161     pass
162
163
164 def single_line():
165     """But with a newline after it!"""
166     pass