- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 82
Closed
Labels
QAQuality AssuranceQuality AssurancebugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Milestone
Description
the return type of cyclonedx_py.client.CycloneDxCmd.execute is currently None.
unfortunately this is not true. There are cases in which the method will never return, but exit python. there are other cases when the method returns. Therefore the return is sometimes typing.NoReturn
motivation:
- be able to write unit tests for cyclonedx_py.client.CycloneDxCmd.execute
- be able to catch raise conditions/exit codes in unit tests.
Proposal:
- change the method to a bare state where it will always exit, but never return.
 therefore usesys.exit()and return type oftyping.NoReturn
 calling methods - like unit tests - could catch theSystemExitexception and work with it if needed/
- cyclonedx_py.client.main()should have a return type of- NoReturnas well.
- do not use exitbutsys.exit- with proper ext message or raise condition.
acc crit:
- all methods & functions of cyclonedx_py.clienteither return or exit. they may throw exceptions in addition.
alternative proposal or an addition:
- implementation detail: use click for arg parsing and CLI foo
Metadata
Metadata
Assignees
Labels
QAQuality AssuranceQuality AssurancebugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request