Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions radon/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

import inspect
import os
import signal
import sys
from contextlib import contextmanager

# Handle broken pipe gracefully when output is piped to head, less, etc.
# This prevents BrokenPipeError when radon output is truncated by pipe consumers
signal.signal(signal.SIGPIPE, signal.SIG_DFL)

from mando import Program
try:
# Python 3.11+
Expand Down