minimal adjustments
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-python / snippets / python.json
1 {
2     "if": {
3         "prefix": "if",
4         "body": [
5             "if ${1:expression}:",
6             "\t${2:pass}"
7         ],
8         "description": "Code snippet for an if statement"
9     },
10     "if/else": {
11         "prefix": "if/else",
12         "body": [
13             "if ${1:condition}:",
14             "\t${2:pass}",
15             "else:",
16             "\t${3:pass}"
17         ],
18         "description": "Code snippet for an if statement with else"
19     },
20     "elif": {
21         "prefix": "elif",
22         "body": [
23             "elif ${1:expression}:",
24             "\t${2:pass}"
25         ],
26         "description": "Code snippet for an elif"
27     },
28     "else": {
29         "prefix": "else",
30         "body": [
31             "else:",
32             "\t${1:pass}"
33         ],
34         "description": "Code snippet for an else"
35     },
36     "while": {
37         "prefix": "while",
38         "body": [
39             "while ${1:expression}:",
40             "\t${2:pass}"
41         ],
42         "description": "Code snippet for a while loop"
43     },
44     "while/else": {
45         "prefix": "while/else",
46         "body": [
47             "while ${1:expression}:",
48             "\t${2:pass}",
49             "else:",
50             "\t${3:pass}"
51         ],
52         "description": "Code snippet for a while loop with else"
53     },
54     "for": {
55         "prefix": "for",
56         "body": [
57             "for ${1:target_list} in ${2:expression_list}:",
58             "\t${3:pass}"
59         ],
60         "description": "Code snippet for a for loop"
61     },
62     "for/else": {
63         "prefix": "for/else",
64         "body": [
65             "for ${1:target_list} in ${2:expression_list}:",
66             "\t${3:pass}",
67             "else:",
68             "\t${4:pass}"
69         ],
70         "description": "Code snippet for a for loop with else"
71     },
72     "try/except": {
73         "prefix": "try/except",
74         "body": [
75             "try:",
76             "\t${1:pass}",
77             "except ${2:expression} as ${3:identifier}:",
78             "\t${4:pass}"
79         ],
80         "description": "Code snippet for a try/except statement"
81     },
82     "try/finally": {
83         "prefix": "try/finally",
84         "body": [
85             "try:",
86             "\t${1:pass}",
87             "finally:",
88             "\t${2:pass}"
89         ],
90         "description": "Code snippet for a try/finally statement"
91     },
92     "try/except/else": {
93         "prefix": "try/except/else",
94         "body": [
95             "try:",
96             "\t${1:pass}",
97             "except ${2:expression} as ${3:identifier}:",
98             "\t${4:pass}",
99             "else:",
100             "\t${5:pass}"
101         ],
102         "description": "Code snippet for a try/except/else statement"
103     },
104     "try/except/finally": {
105         "prefix": "try/except/finally",
106         "body": [
107             "try:",
108             "\t${1:pass}",
109             "except ${2:expression} as ${3:identifier}:",
110             "\t${4:pass}",
111             "finally:",
112             "\t${5:pass}"
113         ],
114         "description": "Code snippet for a try/except/finally statement"
115     },
116     "try/except/else/finally": {
117         "prefix": "try/except/else/finally",
118         "body": [
119             "try:",
120             "\t${1:pass}",
121             "except ${2:expression} as ${3:identifier}:",
122             "\t${4:pass}",
123             "else:",
124             "\t${5:pass}",
125             "finally:",
126             "\t${6:pass}"
127         ],
128         "description": "Code snippet for a try/except/else/finally statement"
129     },
130     "with": {
131         "prefix": "with",
132         "body": [
133             "with ${1:expression} as ${2:target}:",
134             "\t${3:pass}"
135         ],
136         "description": "Code snippet for a with statement"
137     },
138     "def": {
139         "prefix": "def",
140         "body": [
141             "def ${1:funcname}(${2:parameter_list}):",
142             "\t${3:pass}"
143         ],
144         "description": "Code snippet for a function definition"
145     },
146     "def(class method)": {
147         "prefix": "def(class method)",
148         "body": [
149             "def ${1:funcname}(self, ${2:parameter_list}):",
150             "\t${3:pass}"
151         ],
152         "description": "Code snippet for a class method"
153     },
154     "def(static class method)": {
155         "prefix": "def(static class method)",
156         "body": [
157             "@staticmethod",
158             "def ${1:funcname}(${2:parameter_list}):",
159             "\t${3:pass}"
160         ],
161         "description": "Code snippet for a static class method"
162     },
163     "def(abstract class method)": {
164         "prefix": "def(abstract class method)",
165         "body": [
166             "def ${1:funcname}(self, ${2:parameter_list}):",
167             "\traise NotImplementedError"
168         ],
169         "description": "Code snippet for an abstract class method"
170     },
171     "class": {
172         "prefix": "class",
173         "body": [
174             "class ${1:classname}(${2:object}):",
175             "\t${3:pass}"
176         ],
177         "description": "Code snippet for a class definition"
178     },
179     "lambda": {
180         "prefix": "lambda",
181         "body": [
182             "lambda ${1:parameter_list}: ${2:expression}"
183         ],
184         "description": "Code snippet for a lambda statement"
185     },
186     "if(main)": {
187         "prefix": "__main__",
188         "body": [
189             "if __name__ == \"__main__\":",
190             "    ${1:pass}",
191         ],
192         "description": "Code snippet for a `if __name__ == \"__main__\": ...` block"
193     },
194     "async/def": {
195         "prefix": "async/def",
196         "body": [
197             "async def ${1:funcname}(${2:parameter_list}):",
198             "\t${3:pass}"
199         ],
200         "description": "Code snippet for an async statement"
201     },
202     "async/for": {
203         "prefix": "async/for",
204         "body": [
205             "async for ${1:target} in ${2:iter}:",
206             "\t${3:block}"
207         ],
208         "description": "Code snippet for an async for statement"
209     },
210     "async/for/else": {
211         "prefix": "async/for/else",
212         "body": [
213             "async for ${1:target} in ${2:iter}:",
214             "\t${3:block}",
215             "else:",
216             "\t${4:block}"
217         ],
218         "description": "Code snippet for an async for statement with else"
219     },
220     "async/with": {
221         "prefix": "async/with",
222         "body": [
223             "async with ${1:expr} as ${2:var}:",
224             "\t${3:block}"
225         ],
226         "description": "Code snippet for an async with statement"
227     },
228     "ipdb": {
229         "prefix": "ipdb",
230         "body": "import ipdb; ipdb.set_trace()",
231         "description": "Code snippet for ipdb debug"
232     },
233     "pdb": {
234         "prefix": "pdb",
235         "body": "import pdb; pdb.set_trace()",
236         "description": "Code snippet for pdb debug"
237     },
238     "pudb": {
239         "prefix": "pudb",
240         "body": "import pudb; pudb.set_trace()",
241         "description": "Code snippet for pudb debug"
242     },
243 }