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

Method writable

src/click/_compat.py:125–138  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

123 return True
124
125 def writable(self) -> bool:
126 if self._force_writable:
127 return True
128 x = getattr(self._stream, "writable", None)
129 if x is not None:
130 return t.cast(bool, x())
131 try:
132 self._stream.write(b"")
133 except Exception:
134 try:
135 self._stream.write(b"")
136 except Exception:
137 return False
138 return True
139
140 def seekable(self) -> bool:
141 x = getattr(self._stream, "seekable", None)

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected