Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
madpah opened this issue Feb 3, 2022 · 0 comments · Fixed by #148 or #160
Closed

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

madpah opened this issue Feb 3, 2022 · 0 comments · Fixed by #148 or #160
Assignees
Milestone

Comments

@madpah
Copy link
Collaborator

madpah commented Feb 3, 2022

@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)

@madpah madpah mentioned this issue Feb 3, 2022
@madpah madpah self-assigned this Feb 3, 2022
@madpah madpah added this to the 2.0.0 milestone Feb 3, 2022
@madpah madpah linked a pull request Feb 3, 2022 that will close this issue
@madpah madpah linked a pull request Feb 4, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant