StrictDoc Documentation
strictdoc/backend/sdoc/models/inline_link.py
Source file coverage
Path:
strictdoc/backend/sdoc/models/inline_link.py
Lines:
22
Non-empty lines:
16
Non-empty lines covered with requirements:
16 / 16 (100.0%)
Functions:
3
Functions covered by requirements:
3 / 3 (100.0%)
1
"""
2
@relation(SDOC-SRS-149, scope=file)
3
"""
4
 
5
from typing import Any
6
 
7
from strictdoc.helpers.auto_described import auto_described
8
from strictdoc.helpers.mid import MID
9
 
10
 
11
@auto_described()
12
class InlineLink:
13
    def __init__(self, parent: Any, value: str) -> None:
14
        self.parent: Any = parent
15
        self.link: str = value
16
 
17
        # FIXME: Remove either mid or reserved_mid.
18
        self.mid: MID = MID.create()
19
        self.reserved_mid: MID = self.mid
20
 
21
    def parent_node(self) -> Any:
22
        return self.parent.parent