Debian Codegraph @

tests/fixtures/parsing/restructured_text/class_docstrings.py

raw
1 class NotDefinedYet:
2 @property
3 def ha(self) -> "NotDefinedYet":
4 """
5 This property returns `self`.
6
7 It's fun because you can call it like `obj.ha.ha.ha.ha.ha.ha...`.
8
9 :return: self!
10 """
11 return self
12
13
14 class ClassInitFunction:
15 def __init__(self, value: str, other=1) -> None:
16 """
17 Initialize instance.
18
19 :param value: Value to store
20 :param int other: Other value with default
21 """
22 self.value = value
23 self.other = other
24
25
26 class ClassWithFunction:
27 def thing(self, value: str, other=1) -> str:
28 """
29 Concatenate a integer after a string.
30
31 :param value: Value to store
32 :param int other: Other value with default
33 :return: Concatenated result
34 """
35 return f"{value}{other}"