From 0493eee09279c700bac176333c3a99f8cabfd877 Mon Sep 17 00:00:00 2001 From: patrickpa Date: Wed, 12 Jun 2024 11:09:40 +0200 Subject: [PATCH] Add inline documentation to domain specific methods Signed-off-by: patrickpa --- qc_baselib/models/result.py | 2 -- qc_baselib/result.py | 12 ++++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/qc_baselib/models/result.py b/qc_baselib/models/result.py index b8b555a..aa59dc7 100644 --- a/qc_baselib/models/result.py +++ b/qc_baselib/models/result.py @@ -159,8 +159,6 @@ class DomainSpecificInfoType( name: str = attr(name="name") -# Add documentation about the implementation and link issue -# Add docs on public interface as well class IssueType( BaseXmlModel, tag="Issue", diff --git a/qc_baselib/result.py b/qc_baselib/result.py index 69e18d8..fa20c31 100644 --- a/qc_baselib/result.py +++ b/qc_baselib/result.py @@ -327,6 +327,11 @@ def add_domain_specific_info( domain_specific_info_name: str, xml_info: List[etree._Element], ) -> None: + """ + The XML information list provided will be wrapped in the DomainSpecificInfo + tag and the information will be appended to the issue list of domain + specific information. + """ bundle = self._get_checker_bundle(checker_bundle_name=checker_bundle_name) checker = self._get_checker(bundle=bundle, checker_id=checker_id) issue = self._get_issue(checker=checker, issue_id=issue_id) @@ -441,6 +446,13 @@ def get_domain_specific_info( checker_id: str, issue_id: int, ) -> List[DomainSpecificInfoContent]: + """ + The method returns a list containing all relative DomainSpecificContent + dataclasses to the XML tags. + + The XML information in each DomainSpecificInformation tag is unwrapped + and it is returned in a DomainSpecificContent dataclass. + """ bundle = self._get_checker_bundle(checker_bundle_name=checker_bundle_name) checker = self._get_checker(bundle=bundle, checker_id=checker_id) issue = self._get_issue(checker=checker, issue_id=issue_id)