forked from PyCQA/pydocstyle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
functions.py
72 lines (42 loc) · 1.37 KB
/
functions.py
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""A valid module docstrings."""
from .expected import Expectation
expectation = Expectation()
expect = expectation.expect
@expect("D201: No blank lines allowed before function docstring (found 1)")
def func_with_space_before():
"""Test a function with space before docstring."""
pass
@expect("D202: No blank lines allowed after function docstring (found 1)")
def func_with_space_after():
"""Test a function with space after docstring."""
pass
def func_with_inner_func_after():
"""Test a function with inner function after docstring."""
def inner():
pass
pass
def func_with_inner_async_func_after():
"""Test a function with inner async function after docstring."""
async def inner():
pass
pass
def fake_decorator(decorated):
"""Fake decorator used to test decorated inner func."""
return decorated
def func_with_inner_decorated_func_after():
"""Test a function with inner decorated function after docstring."""
@fake_decorator
def inner():
pass
pass
def func_with_inner_decorated_async_func_after():
"""Test a function with inner decorated async function after docstring."""
@fake_decorator
async def inner():
pass
pass
def func_with_inner_class_after():
"""Test a function with inner class after docstring."""
class inner():
pass
pass