MCPcopy
hub / github.com/pallets/click / _has_binary_buffer

Function _has_binary_buffer

src/click/_termui_impl.py:41–46  ·  view source on GitHub ↗
(
    stream: t.BinaryIO | t.TextIO,
)

Source from the content-addressed store, hash-verified

39
40
41def _has_binary_buffer(
42 stream: t.BinaryIO | t.TextIO,
43) -> t.TypeGuard[_BufferedTextPagerStream]:
44 # TextIO is wider than TextIOWrapper; text-only streams such as StringIO
45 # are valid TextIO values but do not expose a binary buffer to wrap.
46 return getattr(stream, "buffer", None) is not None
47
48
49if os.name == "nt":

Callers 1

get_pager_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected