INNER CODE UNIT · Python
is_interactive
panther-labs/panther-analysis · .scripts/claude_review.py:276
def is_interactive():
"""Check if we can prompt the user (terminal or /dev/tty available)."""
try:
with open("/dev/tty", "r"):
return True
except OSError:
return False
def main():
# Skip in non-interactive environments (GitHub Desktop, IDE git, CI)
if not is_interactive():
eprint("Skipping Claude review (non-interactive environment).")
return 0
# Check for claude CLI
if not shutil.which("claude"):
eprint("\u274c 'claude' CLI not found.")