Skip to content

Commit

Permalink
Fix Hyperdrive API docstrings (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaiton authored Nov 9, 2023
1 parent d43326c commit 961970a
Show file tree
Hide file tree
Showing 6 changed files with 219 additions and 137 deletions.
6 changes: 3 additions & 3 deletions lib/agent0/agent0/base/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import asdict, dataclass, is_dataclass, replace
from enum import Enum
from functools import wraps
from typing import Any, Type
from typing import Any

from fixedpointmath import FixedPoint

Expand All @@ -30,10 +30,10 @@ def dtypes(self):
return NotImplemented


def freezable(frozen: bool = False, no_new_attribs: bool = False) -> Type:
def freezable(frozen: bool = False, no_new_attribs: bool = False):
r"""A wrapper that allows classes to be frozen, such that existing member attributes cannot be changed"""

def decorator(cls: Type) -> Type:
def decorator(cls):
# this decorator should only be placed atop a dataclass
if not is_dataclass(cls):
raise TypeError("The class must be a data class.")
Expand Down
2 changes: 1 addition & 1 deletion lib/agent0/bin/checkpoint_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def main() -> None:
block_time = 1
else:
block_time = int(block_time)
# Interval between blocks, passed in anvil through RPC call `anvil_setBlockTimestampInterval`
# Interval between blocks, passed in anvil through RPC `anvil_setBlockTimestampInterval`
block_timestamp_interval = os.environ.get("BLOCK_TIMESTAMP_INTERVAL")
if block_timestamp_interval is None:
block_timestamp_interval = 1
Expand Down
2 changes: 1 addition & 1 deletion lib/agent0/bin/fuzz_bots.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
account_key_config = initialize_accounts(agent_config, env_file=ENV_FILE, random_seed=env_config.random_seed)

# Run agents
# If bots crash, we make rpc call to stop mining anvil
# If bots crash, we use an RPC to stop mining anvil
try:
run_agents(env_config, agent_config, account_key_config, liquidate=LIQUIDATE)
# Don't stop chain if the user interrupts
Expand Down
6 changes: 3 additions & 3 deletions lib/elfpy/elfpy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from dataclasses import asdict, dataclass, is_dataclass, replace
from enum import Enum
from functools import wraps
from typing import Any, Generic, Type, TypeVar
from typing import Any, Generic, TypeVar

from fixedpointmath import FixedPoint

Expand All @@ -30,10 +30,10 @@ def dtypes(self):
return NotImplemented


def freezable(frozen: bool = False, no_new_attribs: bool = False) -> Type:
def freezable(frozen: bool = False, no_new_attribs: bool = False):
r"""A wrapper that allows classes to be frozen, such that existing member attributes cannot be changed"""

def decorator(cls: Type) -> Type:
def decorator(cls):
# this decorator should only be placed atop a dataclass
if not is_dataclass(cls):
raise TypeError("The class must be a data class.")
Expand Down
Loading

1 comment on commit 961970a

@vercel
Copy link

@vercel vercel bot commented on 961970a Nov 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.