mirror of
https://github.com/home-assistant/core.git
synced 2025-11-13 13:00:11 +00:00
Type check homeassistant.scripts (#25464)
* Run mypy on homeassistant.scripts, disabling bunch of checks for now * Declare async_initialize in AuthProvider * Add some type hints * Remove unreachable code * Help mypy out * Script docstring fixes
This commit is contained in:
committed by
Paulus Schoutsen
parent
10b120f11f
commit
e8e84fb764
@@ -5,6 +5,9 @@ import os
|
||||
|
||||
from homeassistant.util.yaml import _SECRET_NAMESPACE
|
||||
|
||||
|
||||
# mypy: allow-untyped-defs
|
||||
|
||||
REQUIREMENTS = ['keyring==17.1.1', 'keyrings.alt==3.1.1']
|
||||
|
||||
|
||||
@@ -39,9 +42,9 @@ def run(args):
|
||||
return 1
|
||||
|
||||
if args.action == 'set':
|
||||
the_secret = getpass.getpass(
|
||||
entered_secret = getpass.getpass(
|
||||
'Please enter the secret for {}: '.format(args.name))
|
||||
keyring.set_password(_SECRET_NAMESPACE, args.name, the_secret)
|
||||
keyring.set_password(_SECRET_NAMESPACE, args.name, entered_secret)
|
||||
print('Secret {} set successfully'.format(args.name))
|
||||
elif args.action == 'get':
|
||||
the_secret = keyring.get_password(_SECRET_NAMESPACE, args.name)
|
||||
|
||||
Reference in New Issue
Block a user