Skip to content

Commit e8d08f8

Browse files
committed
modify TypeError message
1 parent a183a71 commit e8d08f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/getpass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ def _check_echo_char(echo_char):
148148
if echo_char is None:
149149
return
150150
if not isinstance(echo_char, str):
151-
raise TypeError("'echo_char' must be type 'str' or 'None', got: "
152-
f"{echo_char!r} (type: {type(echo_char).__name__})")
151+
raise TypeError("'echo_char' must be str or None, not "
152+
f"{type(echo_char).__name__}")
153153
if not (
154154
len(echo_char) == 1
155155
and echo_char.isprintable()

0 commit comments

Comments
 (0)