Skip to content

Commit 54b4e3e

Browse files
Test - Add functional tests for missing-x-docstring
1 parent b10f7f8 commit 54b4e3e

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# [missing-docstring]
2+
# pylint: disable=too-few-public-methods
3+
4+
def public_documented():
5+
"""It has a docstring."""
6+
7+
8+
def _private_undocumented():
9+
# Doesn't need a docstring
10+
pass
11+
12+
13+
def _private_documented():
14+
"""It has a docstring."""
15+
16+
17+
class ClassDocumented(object):
18+
"""It has a docstring."""
19+
20+
21+
class ClassUndocumented(object): # [missing-docstring]
22+
pass
23+
24+
25+
def public_undocumented(): # [missing-docstring]
26+
pass
27+
28+
29+
def __sizeof__():
30+
# Special
31+
pass
32+
33+
34+
def __mangled():
35+
pass
36+
37+
38+
class Property(object):
39+
"""Don't warn about setters and deleters."""
40+
41+
def __init__(self):
42+
self._value = None
43+
44+
@property
45+
def test(self):
46+
"""Default docstring for setters and deleters."""
47+
48+
@test.setter
49+
def test(self, value):
50+
self._value = value
51+
52+
@test.deleter
53+
def test(self):
54+
pass
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
missing-module-docstring:1::Missing module docstring
2+
missing-class-docstring:21:ClassUndocumented:Missing class docstring
3+
missing-function-docstring:25:public_undocumented:Missing function docstring

0 commit comments

Comments
 (0)