black: Reformat skipping string normalization.
This commit is contained in:
parent
5580c68ae5
commit
fba21bb00d
178 changed files with 6562 additions and 4469 deletions
|
@ -7,7 +7,10 @@ from oauth2client.file import Storage
|
|||
|
||||
try:
|
||||
import argparse
|
||||
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() # type: Optional[argparse.Namespace]
|
||||
|
||||
flags = argparse.ArgumentParser(
|
||||
parents=[tools.argparser]
|
||||
).parse_args() # type: Optional[argparse.Namespace]
|
||||
except ImportError:
|
||||
flags = None
|
||||
|
||||
|
@ -22,6 +25,7 @@ CLIENT_SECRET_FILE = 'client_secret.json'
|
|||
APPLICATION_NAME = 'Zulip Calendar Bot'
|
||||
HOME_DIR = os.path.expanduser('~')
|
||||
|
||||
|
||||
def get_credentials() -> client.Credentials:
|
||||
"""Gets valid user credentials from storage.
|
||||
|
||||
|
@ -32,8 +36,7 @@ def get_credentials() -> client.Credentials:
|
|||
Credentials, the obtained credential.
|
||||
"""
|
||||
|
||||
credential_path = os.path.join(HOME_DIR,
|
||||
'google-credentials.json')
|
||||
credential_path = os.path.join(HOME_DIR, 'google-credentials.json')
|
||||
|
||||
store = Storage(credential_path)
|
||||
credentials = store.get()
|
||||
|
@ -49,4 +52,5 @@ def get_credentials() -> client.Credentials:
|
|||
credentials = tools.run(flow, store)
|
||||
print('Storing credentials to ' + credential_path)
|
||||
|
||||
|
||||
get_credentials()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue