]> 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:

Hypothesis is now formatted with Black 20.8b1 (#1729)
[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
85 def this():
86     r"""
87     'hey ho'
88     """
89
90
91 def that():
92   """ "hey yah" """
93
94
95 def and_that():
96   """
97   "hey yah" """
98
99
100 def and_this():
101   ''' 
102   "hey yah"'''
103
104
105 def believe_it_or_not_this_is_in_the_py_stdlib(): ''' 
106 "hey yah"'''
107
108
109 def ignored_docstring():
110     """a => \
111 b"""  
112
113 # output
114
115 class MyClass:
116     """Multiline
117     class docstring
118     """
119
120     def method(self):
121         """Multiline
122         method docstring
123         """
124         pass
125
126
127 def foo():
128     """This is a docstring with
129     some lines of text here
130     """
131     return
132
133
134 def bar():
135     """This is another docstring
136     with more lines of text
137     """
138     return
139
140
141 def baz():
142     '''"This" is a string with some
143     embedded "quotes"'''
144     return
145
146
147 def troz():
148     """Indentation with tabs
149     is just as OK
150     """
151     return
152
153
154 def zort():
155     """Another
156     multiline
157     docstring
158     """
159     pass
160
161
162 def poit():
163     """
164     Lorem ipsum dolor sit amet.
165
166     Consectetur adipiscing elit:
167      - sed do eiusmod tempor incididunt ut labore
168      - dolore magna aliqua
169        - enim ad minim veniam
170        - quis nostrud exercitation ullamco laboris nisi
171      - aliquip ex ea commodo consequat
172     """
173     pass
174
175
176 def under_indent():
177     """
178       These lines are indented in a way that does not
179     make sense.
180     """
181     pass
182
183
184 def over_indent():
185     """
186     This has a shallow indent
187       - But some lines are deeper
188       - And the closing quote is too deep
189     """
190     pass
191
192
193 def single_line():
194     """But with a newline after it!"""
195     pass
196
197
198 def this():
199     r"""
200     'hey ho'
201     """
202
203
204 def that():
205     """ "hey yah" """
206
207
208 def and_that():
209     """
210     "hey yah" """
211
212
213 def and_this():
214     '''
215     "hey yah"'''
216
217
218 def believe_it_or_not_this_is_in_the_py_stdlib():
219     '''
220     "hey yah"'''
221
222
223 def ignored_docstring():
224     """a => \
225 b"""