Skip to content

Commit

Permalink
Minor updates after review
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Burghardt <[email protected]>
  • Loading branch information
marcusburghardt committed Nov 21, 2024
1 parent 4effe89 commit 5c0ecd5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions ssg/build_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ def _add_cpe_xml(self, root, cpe_platforms_to_not_include, product_cpes=None):
will be added.
cpe_platforms_to_not_include (list): A list of platform IDs to be excluded from the
CPE XML.
product_cpes (optional): An object containing product CPEs. Defaults to None.
product_cpes (dict, optional): An object containing product CPEs. Defaults to None.
Returns:
None
Expand Down Expand Up @@ -853,8 +853,8 @@ def _add_groups_xml(self, root, components_to_not_include, env_yaml=None):
will be appended.
components_to_not_include (dict): A dictionary specifying components (e.g., groups)
that should not be included.
env_yaml (dict, optional): An optional environment YAML configuration that may be passed to
the group's to_xml_element method.
env_yaml (dict, optional): An optional environment YAML configuration that may be passed
to the group's to_xml_element method.
"""
groups_in_bench = list(self.groups.keys())
priority_order = ["system", "services", "auditing"]
Expand Down Expand Up @@ -948,7 +948,7 @@ def to_file(self, file_name, env_yaml=None):
Args:
file_name (str): The name of the file to which the XML data will be written.
env_yaml (dict, ptional): An optional parameter that can be used to customize the XML generation.
env_yaml (dict, optional): An optional parameter that can be used to customize the XML generation.
Returns:
None
Expand Down Expand Up @@ -1101,7 +1101,7 @@ def process_input_dict(cls, input_contents, env_yaml, product_cpes=None):
cls (type): The class type that calls this method.
input_contents (dict): The input dictionary containing initial data.
env_yaml (dict): The environment YAML data.
product_cpes (optional): The product CPEs, defaults to None.
product_cpes (dict, optional): The product CPEs, defaults to None.
Returns:
dict: The processed data dictionary with updated rules, groups, values, and platforms.
Expand Down Expand Up @@ -1708,7 +1708,7 @@ def _has_platforms_to_convert(rule, product_cpes):
(indicating that the platforms have not been evaluated yet).
Args:
rule (object): The rule object which may contain platform information.
rule (Rule): The rule object which may contain platform information.
product_cpes (list): A list of product CPEs to look up.
Returns:
Expand Down Expand Up @@ -3193,7 +3193,7 @@ def get_benchmark_xml_by_profile(self, rule_and_variables_dict):
to be used for generating the benchmark XML.
Yields:
tuple: A tuple containing the profile ID and the corresponding benchmark XML.
tuple: A tuple containing the profile ID (str) and the corresponding benchmark XML (str).
Raises:
Exception: If the benchmark is not loaded before calling this method.
Expand Down Expand Up @@ -3451,11 +3451,11 @@ def from_text(cls, expression, product_cpes):
Args:
cls: The class itself.
expression (str): The text expression to parse.
product_cpes: The product CPEs to use for parsing and resolving CPE items.
product_cpes (ProductCPEs): The product CPEs to use for parsing and resolving CPE items.
Returns:
platform: A platform object with the parsed and enriched CPE information, or None if
product_cpes is empty.
platform (Platform): A platform object with the parsed and enriched CPE information,
or None if product_cpes is empty.
"""
if not product_cpes:
return None
Expand Down

0 comments on commit 5c0ecd5

Please sign in to comment.