Skip to content

Commit

Permalink
docs: add missing docs to api.accounts (#2026)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Apr 25, 2024
1 parent e5da55c commit 645b0a7
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions src/ape/api/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,15 +401,22 @@ class AccountContainerAPI(BaseInterfaceModel):
instances.
"""

"""
The path to the account's data.
"""
data_folder: Path

"""
The type of account in this container.
See :class:`~ape.api.accounts.AccountAPI`.
"""
account_type: Type[AccountAPI]

@property
@abstractmethod
def aliases(self) -> Iterator[str]:
"""
Iterate over all available aliases.
All available aliases.
Returns:
Iterator[str]
Expand All @@ -419,7 +426,7 @@ def aliases(self) -> Iterator[str]:
@abstractmethod
def accounts(self) -> Iterator[AccountAPI]:
"""
Iterate over all accounts.
All accounts.
Returns:
Iterator[:class:`~ape.api.accounts.AccountAPI`]
Expand Down Expand Up @@ -542,21 +549,21 @@ class TestAccountContainerAPI(AccountContainerAPI):
"""
Test account containers for ``ape test`` (such containers that generate accounts using
:class:`~ape.utils.GeneratedDevAccounts`) should implement this API instead of
``AccountContainerAPI`` directly. This is how they show up in the ``accounts`` test fixture.
``AccountContainerAPI`` directly. Then, they show up in the ``accounts`` test fixture.
"""

@abstractmethod
def generate_account(self) -> "TestAccountAPI":
"""
Generate a new test account
Generate a new test account.
"""


class TestAccountAPI(AccountAPI):
"""
Test accounts for ``ape test`` (such accounts that use
:class:`~ape.utils.GeneratedDevAccounts`) should implement this API
instead of ``AccountAPI`` directly. This is how they show up in the ``accounts`` test fixture.
instead of ``AccountAPI`` directly. Then, they show up in the ``accounts`` test fixture.
"""


Expand All @@ -565,6 +572,9 @@ class ImpersonatedAccount(AccountAPI):
An account to use that does not require signing.
"""

"""
The field-address of the account.
"""
raw_address: AddressType

@property
Expand Down

0 comments on commit 645b0a7

Please sign in to comment.