Skip to content

Commit

Permalink
fix pylint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
djeck1432 committed Dec 2, 2024
1 parent 91ceb44 commit 3cf96ea
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 5 additions & 1 deletion web_app/contract_tools/mixins/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ async def get_wallet_balances(cls, holder_address: str) -> Dict[str, str]:
return wallet_balances

@classmethod
async def get_zklend_position(cls, contract_address: str, position: "Position") -> DashboardResponse:
async def get_zklend_position(
cls,
contract_address: str,
position: "Position"
) -> DashboardResponse:
"""
Get the zkLend position for the given wallet ID.
:param contract_address: contract address
Expand Down
15 changes: 11 additions & 4 deletions web_app/contract_tools/mixins/health_ratio.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
"""
HealthRatioMixin is a mixin class to calculate the health ratio of a deposit contract.
"""
import asyncio
from decimal import Decimal

Expand Down Expand Up @@ -37,9 +40,11 @@ async def _get_z_balances(
"""
Get the balances of tokens in a deposit contract.
:param reserves: A dictionary of token reserves with token symbols as keys and tuples of (decimals, address) as values.
:param reserves: A dictionary of token reserves with token symbols as keys
and tuples of (decimals, address) as values.
:param deposit_contract_address: The address of the deposit contract.
:return: A dictionary of token balances with token symbols as keys and balances as Decimal values.
:return: A dictionary of token balances with token symbols as keys
and balances as Decimal values.
"""
tasks = [
CLIENT.get_balance(z_data[1], deposit_contract_address, z_data[0])
Expand All @@ -59,7 +64,8 @@ async def _get_deposited_tokens(
Get the deposited tokens and their amounts in a deposit contract.
:param deposit_contract_address: The address of the deposit contract.
:return: A dictionary of deposited tokens with token symbols as keys and amounts as Decimal values.
:return: A dictionary of deposited tokens with token symbols as keys
and amounts as Decimal values.
"""
reserves = await CLIENT.get_z_addresses()
deposits = await cls._get_z_balances(reserves, deposit_contract_address)
Expand All @@ -75,7 +81,8 @@ async def _get_pragma_prices(cls, tokens: set) -> dict[str, Decimal]:
Get the prices of multiple tokens from the Pragma API.
:param tokens: A set of token symbols.
:return: A dictionary of token prices with token symbols as keys and prices as Decimal values.
:return: A dictionary of token prices with token symbols as
keys and prices as Decimal values.
"""
tasks = [cls._get_pragma_price(token) for token in tokens]
return {
Expand Down

0 comments on commit 3cf96ea

Please sign in to comment.