Skip to content

Commit

Permalink
refactor: remove unneeded conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
tcp committed Oct 12, 2023
1 parent baf65ee commit 1ce704f
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions packages/hagrid/hagrid/orchestra.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,31 +172,18 @@ def client(self) -> Any:
)

def login_as_guest(self, **kwargs: Any) -> Optional[Any]:
client = self.client

session = client.login_as_guest(**kwargs)

if isinstance(session, SyftError):
return session

return session
return self.client.login_as_guest(**kwargs)

def login(
self, email: Optional[str] = None, password: Optional[str] = None, **kwargs: Any
) -> Optional[Any]:
client = self.client

if not email:
email = input("Email: ")

if not password:
password = getpass.getpass("Password: ")

session = client.login(email=email, password=password, **kwargs)

if isinstance(session, SyftError):
return session

return session
return self.client.login(email=email, password=password, **kwargs)

def register(
self,
Expand Down

0 comments on commit 1ce704f

Please sign in to comment.