MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _stdin_is_tty

Function _stdin_is_tty

openkb/cli.py:876–883  ·  view source on GitHub ↗

Return True when stdin is a real terminal. Used to skip optional ``openkb init`` prompts when input is piped or redirected, so existing automation (e.g. ``printf '\\n\\n' | openkb init``) keeps working as new prompts are added. Mirrors ``_stream_to_tty`` from #45.

()

Source from the content-addressed store, hash-verified

874
875
876def _stdin_is_tty() -> bool:
877 """Return True when stdin is a real terminal.
878
879 Used to skip optional ``openkb init`` prompts when input is piped or
880 redirected, so existing automation (e.g. ``printf '\\n\\n' | openkb init``)
881 keeps working as new prompts are added. Mirrors ``_stream_to_tty`` from #45.
882 """
883 return sys.stdin.isatty()
884
885
886@cli.command()

Callers 2

initFunction · 0.85
feedbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected