Commit 953a40e
committed
Refine CycloneDX support #1888
Only deal with an SPDX license_expression and not plain licenses or
declared licenses, because this is the only correct license information.
Removing most type hints since we are not yet checking these.
Remove dependency lookup which could be misleading. Instead add warning
if dependencies are skipped.
Add docstring to most methods and functions.
Streamline nested list comprehensions and filter/map constructions and
replace these with simpler constructs.
Replace JSON encoder by a plain to_dict() serialization throughout.
Move attrs attributes declarations towards the top of classes
declarations rather than at the bottom.
Move move method-like functions to their respective objects, including
moving XML serialization functions to to_xml_element() methods for each
model object.
Use factories for fields defaults such as URN and timestamp.
Split method that work on ScanCode packages lists in two: one operating
on a single package mapping and one working on the packages list.
Update tests to work on larger set of expected data.
Always return all attributes, including empty values for now.
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>1 parent 4e2526c commit 953a40e
File tree
6 files changed
+845
-781
lines changed- src/formattedcode
- tests/formattedcode
- data/cyclonedx
6 files changed
+845
-781
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
201 | | - | |
| 201 | + | |
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| |||
0 commit comments