Skip to content

[BREAKING] All optional lists become non-optional sets #159

Closed
@madpah

Description

@madpah

@madpah a huge change i would suggest is: all optional lists become non-optional sets.
based on https://github.com/CycloneDX/cyclonedx-python-lib/pull/148/files#r798309225

this way a lot of problems would be solved:

  • no need for implementing object.add_<list-property>() all the time
  • the order of the list-properties would no longer matter - no sorting, no whatsoever
  • serializers/normalizers would always have a reliable non-optional data type to work with (remeber: an empty set is falsy - for easy size-checks)
  • additionally: use the set-literal: instead of writing set([...]) simply write {...} - if this was needed at any place, still

Originally posted by @jkowalleck in #148 (comment)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions