Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit a84fa6f

Browse files
committed
PS-8884 small pep8 fixes
1 parent 95569a9 commit a84fa6f

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

paperspace/login.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import getpass
22
import json
3-
import os
4-
import sys
53

64
import requests
75
from six.moves import input
86

97
from .config import *
108
from .method import requests_exception_to_error_obj, response_error_check, status_code_to_error_obj
119

12-
13-
UNAUTHORIZED_EXTENDED_INFO = '\n\nNote: Please keep in mind that currently you can login only with the email and password ' \
14-
'from your Paperspace account. If you\'re using AD, SAML or GitHub credentials, please log into the Paperspace Console ' \
15-
'and create an API key for use with the CLI client. For more information, please refer to the CLI client documentation.'
10+
UNAUTHORIZED_EXTENDED_INFO = '\n\nNote: Please keep in mind that currently you can login only with the email and ' \
11+
'password from your Paperspace account. If you\'re using AD, SAML or GitHub ' \
12+
'credentials, please log into the Paperspace Console and create an API key for use with ' \
13+
'the CLI client. For more information, please refer to the CLI client documentation.'
1614

1715

1816
def is_error_or_missing_keys_print(res, *required_keys):
@@ -50,7 +48,7 @@ def login(email=None, password=None, apiToken=None):
5048
password = getpass.getpass('Password: ')
5149

5250
# get access_token
53-
params = { "email": email, "password": password }
51+
params = {"email": email, "password": password}
5452
try:
5553
r = requests.request('post', config.CONFIG_HOST + '/users/login',
5654
json=params)
@@ -66,7 +64,7 @@ def login(email=None, password=None, apiToken=None):
6664
return False
6765

6866
# get api key using access_token
69-
params = { 'access_token': res['id'] }
67+
params = {'access_token': res['id']}
7068
if apiToken:
7169
params['apiToken'] = apiToken
7270
try:

0 commit comments

Comments
 (0)