Skip to content

Commit

Permalink
๐Ÿฑ Style: PyLint
Browse files Browse the repository at this point in the history
  • Loading branch information
Zerohertz committed Apr 5, 2024
1 parent c472d41 commit 9c6f842
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions zerohertzLib/quant/quant.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
from .backtest import Experiments, backtest
from .util import _cash2str, _method2str, _seconds_to_hms

BalanceType = TypeVar("Balance", bound="Balance")
T = TypeVar("T", bound="Balance")


class Quant(Experiments):
Expand Down Expand Up @@ -387,7 +387,7 @@ def _exchange(self) -> float:
data = fdr.DataReader("USD/KRW", now - timedelta(days=10))
return data.Close[-1]

def merge(self, balance: BalanceType) -> None:
def merge(self, balance: T) -> None:
"""ํ˜„์žฌ ๊ณ„์ขŒ์™€ ์ž…๋ ฅ ๊ณ„์ขŒ์˜ ์ •๋ณด๋ฅผ ๋ณ‘ํ•ฉํ•˜๋Š” ํ•จ์ˆ˜
Args:
Expand Down Expand Up @@ -582,14 +582,14 @@ def pie(self) -> str:
data["Cash"] = max(data["Cash"], cash)
return pie(data, dim, title="Portfolio", dpi=100, int_label=self.kor)

def bar(self) -> str:
def barv(self) -> str:
"""ํ˜„์žฌ ๋ณด์œ  ์ข…๋ชฉ์˜ ์ด์ต๊ณผ ์†์‹ค์„ bar chart๋กœ ์‹œ๊ฐํ™”
Returns:
``str``: ์ €์žฅ๋œ graph์˜ ์ ˆ๋Œ€ ๊ฒฝ๋กœ
Examples:
>>> balance.bar()
>>> balance.barv()
"""
if self.kor:
dim = "โ‚ฉ"
Expand Down

0 comments on commit 9c6f842

Please sign in to comment.