Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
etzellux committed Jul 31, 2024
1 parent b849bc0 commit d2d3d75
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tinyman/governance/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def prepare_create_proposal_transactions(
if required_tiny_power := self.get_required_tiny_power_to_create_proposal():
if account_tiny_power < required_tiny_power:
raise InsufficientTinyPower()

if executor:
executor = decode_address(executor)
else:
Expand Down
2 changes: 1 addition & 1 deletion tinyman/governance/vault/constants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from tinyman.constants import MINIMUM_BALANCE_REQUIREMENT_PER_BOX, MINIMUM_BALANCE_REQUIREMENT_PER_BOX_BYTE
from tinyman.governance.constants import DAY, WEEK
from tinyman.governance.constants import WEEK

MIN_LOCK_TIME = 4 * WEEK # 4 WEEK
MAX_LOCK_TIME = 4 * 52 * WEEK # 364 * 4 Days
Expand Down
4 changes: 2 additions & 2 deletions tinyman/governance/vault/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
SLOPE_CHANGE_BOX_COST, ACCOUNT_POWER_BOX_COST, TOTAL_POWER_BOX_COST, MIN_LOCK_AMOUNT, MIN_LOCK_AMOUNT_INCREMENT, INIT_APP_ARGUMENT, CREATE_LOCK_APP_ARGUMENT, \
CREATE_CHECKPOINTS_APP_ARGUMENT, INCREASE_LOCK_AMOUNT_APP_ARGUMENT, EXTEND_LOCK_END_TIME_APP_ARGUMENT, WITHDRAW_APP_ARGUMENT, GET_TINY_POWER_OF_APP_ARGUMENT, \
GET_TINY_POWER_OF_AT_APP_ARGUMENT, GET_TOTAL_TINY_POWER_APP_ARGUMENT, GET_TOTAL_TINY_POWER_AT_APP_ARGUMENT, GET_TOTAL_CUMULATIVE_POWER_AT_APP_ARGUMENT, GET_CUMULATIVE_POWER_OF_AT_APP_ARGUMENT, \
GET_ACCOUNT_CUMULATIVE_POWER_DELTA_APP_PREFIX, GET_TOTAL_CUMULATIVE_POWER_DELTA_APP_PREFIX,DELETE_ACCOUNT_POWER_BOXES_APP_ARGUMENT, DELETE_ACCOUNT_STATE_APP_ARGUMENT
GET_ACCOUNT_CUMULATIVE_POWER_DELTA_APP_PREFIX, GET_TOTAL_CUMULATIVE_POWER_DELTA_APP_PREFIX, DELETE_ACCOUNT_POWER_BOXES_APP_ARGUMENT, DELETE_ACCOUNT_STATE_APP_ARGUMENT
from tinyman.governance.vault.utils import get_new_total_power_timestamps
from tinyman.utils import TransactionGroup

Expand Down Expand Up @@ -616,7 +616,7 @@ def prepare_get_total_cumulative_power_delta_transactions(
total_power_box_index_1 = 0
else:
total_power_box_index_1 = total_power_index_1 // TOTAL_POWER_BOX_ARRAY_LEN

total_power_index_2 = get_power_index_at(total_powers, timestamp_2)
if total_power_index_2 is None:
total_power_index_2 = 0
Expand Down
2 changes: 1 addition & 1 deletion tinyman/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def get_state_bytes(state, key):


def lpad(string: bytes, n: int) -> bytes:
assert(n > 0)
assert (n > 0)

return b"\x00" * (n - len(string)) + string

Expand Down

0 comments on commit d2d3d75

Please sign in to comment.