MCPcopy
hub / github.com/fastapi/typer / visible_input

Method visible_input

typer/testing.py:197–205  ·  view source on GitHub ↗
(prompt: str | None = None)

Source from the content-addressed store, hash-verified

195 )
196
197 def visible_input(prompt: str | None = None) -> str:
198 sys.stdout.write(prompt or "")
199 try:
200 val = next(text_input).rstrip("\r\n")
201 except StopIteration as e: # pragma: no cover
202 raise EOFError() from e
203 sys.stdout.write(f"{val}\n")
204 sys.stdout.flush()
205 return val
206
207 def hidden_input(prompt: str | None = None) -> str:
208 sys.stdout.write(f"{prompt or ''}\n")

Callers

nothing calls this directly

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected