Total Complexity | 4 |
Total Lines | 41 |
Duplicated Lines | 0 % |
1 | """ |
||
13 | class LabelNode(Node): |
||
14 | """ |
||
15 | SDoc2 node for labels. |
||
16 | """ |
||
17 | |||
18 | # ------------------------------------------------------------------------------------------------------------------ |
||
19 | def __init__(self, options, argument): |
||
20 | """ |
||
21 | Object constructor. |
||
22 | |||
23 | :param dict[str,str] options: The options of this label. |
||
24 | :param str argument: The title of this label. |
||
25 | """ |
||
26 | super().__init__('label', options, argument) |
||
27 | |||
28 | # ------------------------------------------------------------------------------------------------------------------ |
||
29 | def get_command(self): |
||
30 | """ |
||
31 | Returns the command of this node, i.e. label. |
||
32 | |||
33 | :rtype: str |
||
34 | """ |
||
35 | return 'label' |
||
36 | |||
37 | # ------------------------------------------------------------------------------------------------------------------ |
||
38 | def is_block_command(self): |
||
39 | """ |
||
40 | Returns False. |
||
41 | |||
42 | :rtype: bool |
||
43 | """ |
||
44 | return False |
||
45 | |||
46 | # ------------------------------------------------------------------------------------------------------------------ |
||
47 | def is_inline_command(self): |
||
48 | """ |
||
49 | Returns True. |
||
50 | |||
51 | :rtype: bool |
||
52 | """ |
||
53 | return True |
||
54 | |||
57 |