Skip to content

Commit

Permalink
fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Lum <lumjjb@gmail.com>
  • Loading branch information
lumjjb authored and armintaenzertng committed Aug 17, 2023
1 parent 32e3d2d commit 3f1c62f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/spdx_tools/spdx/parser/jsonlikedict/relationship_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,34 @@ def parse_all_relationships(self, input_doc_dict: Dict) -> List[Relationship]:
document_describes: List[str] = delete_duplicates_from_list(input_doc_dict.get("documentDescribes", []))
doc_spdx_id: Optional[str] = input_doc_dict.get("SPDXID")

existing_relationships_without_comments: List[Relationship] = self.get_all_relationships_without_comments(relationships)
existing_relationships_without_comments: List[Relationship] = self.get_all_relationships_without_comments(
relationships
)
relationships.extend(
parse_field_or_log_error(
self.logger,
document_describes,
lambda x: self.parse_document_describes(
doc_spdx_id=doc_spdx_id, described_spdx_ids=x, existing_relationships=existing_relationships_without_comments
doc_spdx_id=doc_spdx_id,
described_spdx_ids=x,
existing_relationships=existing_relationships_without_comments,
),
[],
)
)

package_dicts: List[Dict] = input_doc_dict.get("packages", [])
existing_relationships_without_comments: List[Relationship] = self.get_all_relationships_without_comments(relationships)
existing_relationships_without_comments: List[Relationship] = self.get_all_relationships_without_comments(
relationships
)

relationships.extend(
parse_field_or_log_error(
self.logger,
package_dicts,
lambda x: self.parse_has_files(package_dicts=x, existing_relationships=existing_relationships_without_comments),
lambda x: self.parse_has_files(
package_dicts=x, existing_relationships=existing_relationships_without_comments
),
[],
)
)
Expand Down

0 comments on commit 3f1c62f

Please sign in to comment.