forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDocStrings.py
More file actions
59 lines (43 loc) · 833 Bytes
/
DocStrings.py
File metadata and controls
59 lines (43 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#Modules should have docstrings
class OK:
'Classes need doc strings'
'Two strings'
pass
"Another string"
#All functions must be multi-line or there are ignored by the query
class _OK:
'Unless they are private'
pass
pass
def f_ok(x, y):
'And functions'
pass
pass
def _f_ok(y, z):
#Unless they are private
pass
pass
class OK2:
'doc-string'
def meth_ok(self):
'Methods need docstrings'
pass
pass
def _meth_ok(self):
#Unless they are private
pass
pass
class Not_OK:
#No docstring
def meth_ok(self):
'Methods need docstrings'
pass
pass
def meth_not_ok(self):
#No doc-string
pass
pass
def not_ok(x, y):
#Should have a doc-string
pass
pass