diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-11-02 16:58:31 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-11-02 16:58:31 -0500 |
commit | 598e71b5ea1392f25cca0290c5544ab1135c37a2 (patch) | |
tree | 76cd61b733e3bffae640e61146bc0c30c317c5cc /Account.py | |
parent | 0bef69a049f4bace9b06cb4beb3b0505dd7b7a44 (diff) | |
download | yoshi-cli-598e71b5ea1392f25cca0290c5544ab1135c37a2.tar.gz yoshi-cli-598e71b5ea1392f25cca0290c5544ab1135c37a2.tar.bz2 yoshi-cli-598e71b5ea1392f25cca0290c5544ab1135c37a2.zip |
add pylint workflow
Diffstat (limited to 'Account.py')
-rw-r--r-- | Account.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1,7 +1,16 @@ +""" +This script imports necessary modules for database interactions. + +Modules imported: + - database: A custom module providing database functionality. +""" + import database class Account: + """Represents a login account.""" + def __init__(self, uuid: str, application: str, username: str, password: str, url: str) -> None: self.uuid = uuid @@ -11,6 +20,7 @@ class Account: self.url = url def display_account(self) -> None: + """Print the account details.""" print('ID:', self.uuid) print('Application:', self.application) print('Username:', self.username) @@ -18,9 +28,15 @@ class Account: print('URL:', self.url) def save_account(self) -> None: + """Save the account details to the database.""" database.create_account( self.uuid, self.application, self.username, self.password, self.url) def delete_account(self) -> bool: + """Delete the account from the database. + + Returns: + bool: True if the deletion was successful. + """ database.delete_account(self.uuid) return True |