Fixes BrokenPipeError that occurs when radon output is piped to commands
that truncate output (head, less, etc.). This is a common workflow issue
that prevents radon from being used in shell pipelines.
- Add signal.signal(signal.SIGPIPE, signal.SIG_DFL) to CLI initialization
- Enables clean exit when pipe consumer terminates early
- No impact on normal output behavior
- Follows standard Unix pipe handling conventions
Resolves: Broken pipe errors in terminal workflows
Tested: All radon commands (cc, raw, mi, hal) work correctly with pipes
Fixes BrokenPipeError that occurs when radon output is piped to commands that truncate output (head, less, etc.). This is a common workflow issue that prevents radon from being used in shell pipelines.
I often use head/less with most of the tools so the output doesn't overflow out of my control on terminal. Then needing to scroll back up. So I fixed it locally and thought this fix could help others like me so pushing PR.
Resolves: Broken pipe errors in terminal workflows
Tested: All radon commands (cc, raw, mi, hal) work correctly with pipes