@@ -288,9 +288,10 @@ def from_dict(cls, affected_pkg: dict):
288288@dataclasses .dataclass (order = True )
289289class AdvisoryData :
290290 """
291- This data class expresses the contract between data sources and the import runner.
291+ AdvisoryData data class expresses the contract between data sources and the import runner.
292292
293293 If a vulnerability_id is present then:
294+
294295 summary or affected_packages or references must be present
295296 otherwise
296297 either affected_package or references should be present
@@ -427,16 +428,15 @@ class OvalImporter(Importer):
427428 @staticmethod
428429 def create_purl (pkg_name : str , pkg_data : Mapping ) -> PackageURL :
429430 """
430- Helper method for creating different purls for subclasses without them reimplementing
431- get_data_from_xml_doc method
432- Note: pkg_data must include 'type' of package
431+ Return a purl. Helper method for creating different purls for subclasses without them
432+ reimplementing get_data_from_xml_doc method Note: pkg_data must include 'type' of package
433433 """
434434 return PackageURL (name = pkg_name , ** pkg_data )
435435
436436 @staticmethod
437437 def _collect_pkgs (parsed_oval_data : Mapping ) -> Set :
438438 """
439- Helper method, used for loading the API. It expects data from
439+ Collect packages. Helper method, used for loading the API. It expects data from
440440 OvalParser.get_data().
441441 """
442442 all_pkgs = set ()
@@ -477,14 +477,16 @@ def get_data_from_xml_doc(
477477 self , xml_doc : ET .ElementTree , pkg_metadata = {}
478478 ) -> Iterable [AdvisoryData ]:
479479 """
480+ Return an ietarble of AdvisoryData.
480481 The orchestration method of the OvalDataSource. This method breaks an
481482 OVAL xml ElementTree into a list of `Advisory`.
482483
483484 Note: pkg_metadata is a mapping of Package URL data that MUST INCLUDE
484485 "type" key.
485486
486487 Example value of pkg_metadata:
487- {"type":"deb","qualifiers":{"distro":"buster"} }
488+
489+ {"type":"deb","qualifiers":{"distro":"buster"} }
488490 """
489491 oval_parsed_data = OvalParser (self .translations , xml_doc )
490492 raw_data = oval_parsed_data .get_data ()
0 commit comments