MCPcopy Index your code
hub / github.com/RustPython/RustPython / _check_echo_char

Function _check_echo_char

Lib/getpass.py:146–159  ·  view source on GitHub ↗
(echo_char)

Source from the content-addressed store, hash-verified

144
145
146def _check_echo_char(echo_char):
147 # Single-character ASCII excluding control characters
148 if echo_char is None:
149 return
150 if not isinstance(echo_char, str):
151 raise TypeError("'echo_char' must be a str or None, not "
152 f"{type(echo_char).__name__}")
153 if not (
154 len(echo_char) == 1
155 and echo_char.isprintable()
156 and echo_char.isascii()
157 ):
158 raise ValueError("'echo_char' must be a single printable ASCII "
159 f"character, got: {echo_char!r}")
160
161
162def _raw_input(prompt="", stream=None, input=None, echo_char=None):

Callers 3

unix_getpassFunction · 0.85
win_getpassFunction · 0.85
fallback_getpassFunction · 0.85

Calls 4

isinstanceFunction · 0.85
lenFunction · 0.85
isprintableMethod · 0.45
isasciiMethod · 0.45

Tested by

no test coverage detected