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

Add docstrings to fmt checking functions, add to docs
[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 over_indent():
62   """
63   This has a shallow indent
64     - But some lines are deeper
65     - And the closing quote is too deep
66     """
67   pass
68
69 # output
70
71 class MyClass:
72     """Multiline
73     class docstring
74     """
75
76     def method(self):
77         """Multiline
78         method docstring
79         """
80         pass
81
82
83 def foo():
84     """This is a docstring with
85     some lines of text here
86     """
87     return
88
89
90 def bar():
91     """This is another docstring
92     with more lines of text
93     """
94     return
95
96
97 def baz():
98     '''"This" is a string with some
99     embedded "quotes"'''
100     return
101
102
103 def troz():
104     """Indentation with tabs
105     is just as OK
106     """
107     return
108
109
110 def zort():
111     """Another
112     multiline
113     docstring
114     """
115     pass
116
117
118 def poit():
119     """
120     Lorem ipsum dolor sit amet.
121
122     Consectetur adipiscing elit:
123      - sed do eiusmod tempor incididunt ut labore
124      - dolore magna aliqua
125        - enim ad minim veniam
126        - quis nostrud exercitation ullamco laboris nisi
127      - aliquip ex ea commodo consequat
128     """
129     pass
130
131
132 def over_indent():
133     """
134     This has a shallow indent
135       - But some lines are deeper
136       - And the closing quote is too deep
137     """
138     pass