mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-09 10:51:57 +00:00
pylint
This commit is contained in:
@@ -62,14 +62,13 @@ def main():
|
||||
"""Main function"""
|
||||
login_info = get_login_info()
|
||||
if login_info == Error.READ_ERROR:
|
||||
return login_prompt()
|
||||
|
||||
status = get_login_status(login_info=login_info)
|
||||
if status == Status.VALID_LOGIN:
|
||||
launch_terminal(login_info=login_info)
|
||||
|
||||
if status == Status.INVALID_LOGIN:
|
||||
login_prompt(welcome=False)
|
||||
login_prompt()
|
||||
else:
|
||||
status = get_login_status(login_info=login_info)
|
||||
if status == Status.VALID_LOGIN:
|
||||
launch_terminal(login_info=login_info)
|
||||
if status == Status.INVALID_LOGIN:
|
||||
login_prompt(welcome=False)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -92,16 +92,14 @@ def process_response(response: requests.Response, save: bool) -> Union[dict, Err
|
||||
if save:
|
||||
write_to_file(login, SETTINGS_DIRECTORY / "login.json")
|
||||
return login
|
||||
|
||||
if response.status_code == 401:
|
||||
console.print(Error.WRONG_CREDENTIALS.value)
|
||||
return Error.WRONG_CREDENTIALS
|
||||
elif response.status_code == 403:
|
||||
if response.status_code == 403:
|
||||
console.print(Error.UNVERIFIED_EMAIL.value)
|
||||
return Error.UNVERIFIED_EMAIL
|
||||
else:
|
||||
console.print(Error.UNKNOWN_ERROR.value)
|
||||
return Error.UNKNOWN_ERROR
|
||||
console.print(Error.UNKNOWN_ERROR.value)
|
||||
return Error.UNKNOWN_ERROR
|
||||
|
||||
|
||||
def request_login_info(email: str, password: str, save: bool) -> Union[dict, Error]:
|
||||
|
||||
Reference in New Issue
Block a user