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

Method fileno

src/click/testing.py:192–200  ·  view source on GitHub ↗

Return the file descriptor of the saved original stream when ``CliRunner`` runs in ``fd`` mode. Otherwise delegate to :class:`~io.TextIOWrapper`, which raises :exc:`io.UnsupportedOperation` for a ``BytesIO``-backed buffer.

(self)

Source from the content-addressed store, hash-verified

190 """
191
192 def fileno(self) -> int:
193 """Return the file descriptor of the saved original stream when
194 ``CliRunner`` runs in ``fd`` mode. Otherwise delegate to
195 :class:`~io.TextIOWrapper`, which raises
196 :exc:`io.UnsupportedOperation` for a ``BytesIO``-backed buffer.
197 """
198 if self._original_fd >= 0:
199 return self._original_fd
200 return super().fileno()
201
202 @property
203 def name(self) -> str:

Callers 5

raw_terminalFunction · 0.80
startMethod · 0.80
_is_consoleFunction · 0.80
cliFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected