File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ def password_prompt(prompt_text: str) -> str:
229
229
return getpass .getpass (prompt_text )
230
230
231
231
232
- def get_password_from_keyring (system , username ) :
232
+ def get_password_from_keyring (system : str , username : str ) -> Optional [ str ] :
233
233
try :
234
234
return keyring .get_password (system , username )
235
235
except Exception as exc :
@@ -256,11 +256,15 @@ def password_from_keyring_or_prompt(
256
256
)
257
257
258
258
259
- def raises_noninteractive_exc (message ) :
259
+ def raises_noninteractive_exc (message : str ) -> None :
260
260
raise exceptions .NonInteractive (message )
261
261
262
262
263
- def generate_prompt_func_from (prompt_func , prompt_type , non_interactive ):
263
+ def generate_prompt_func_from (
264
+ prompt_func : Callable ,
265
+ prompt_type : str ,
266
+ non_interactive : bool = False
267
+ ) -> Callable :
264
268
if non_interactive :
265
269
error_message = "Credential not found for {}." .format (prompt_type )
266
270
return functools .partial (
You can’t perform that action at this time.
0 commit comments