From 29205efe4fafcf8cc43efeaf71fcbb861a6d6a41 Mon Sep 17 00:00:00 2001 From: SantaSpeen Date: Wed, 2 Apr 2025 16:02:01 +0300 Subject: [PATCH] [+] AnixartAccountSaved --- anixart/auth/__init__.py | 2 +- anixart/auth/account.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/anixart/auth/__init__.py b/anixart/auth/__init__.py index 7f5464a..4b16e94 100644 --- a/anixart/auth/__init__.py +++ b/anixart/auth/__init__.py @@ -1 +1 @@ -from .account import AnixartAccount, AnixartAccountToken +from .account import AnixartAccount, AnixartAccountSaved, AnixartAccountToken diff --git a/anixart/auth/account.py b/anixart/auth/account.py index 00b3dab..467075e 100644 --- a/anixart/auth/account.py +++ b/anixart/auth/account.py @@ -28,14 +28,14 @@ class AnixartAccount: def token(self): return self._token - def to_file(self, filename: str | Path): + def to_file(self, filename: str | Path) -> "AnixartAccountSaved": """Save the account information to a file.""" acc = AnixartAccountSaved.from_account(filename, self) acc.save() return acc @classmethod - def from_file(cls, filename: str | Path): + def from_file(cls, filename: str | Path) -> "AnixartAccountSaved": """Load the account information from a file.""" acc = AnixartAccountSaved(filename) acc.load()