Skip to content

Commit

Permalink
commands: improve typings, WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
kaelzhang committed Dec 12, 2024
1 parent 6708894 commit 59e3879
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions stock_pandas/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
Optional,
Callable,
List,
Dict,
Any
Union,
Dict
)

from numpy import ndarray
Expand All @@ -16,10 +16,14 @@

ReturnType = Tuple[ndarray, int]
CommandFormula = Callable[..., ReturnType]
CommandArg = Union[str, int, float]
CommandArgs = List[
Tuple[
Optional[Any],
Optional[Callable]
Union[
Tuple[
Optional[CommandArg],
Optional[Callable[..., CommandArg]]
],
CommandArg
]
]

Expand Down
2 changes: 1 addition & 1 deletion stock_pandas/commands/trend_following.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def macd_histogram(
# bbi
# ----------------------------------------------------

def bbi(df, s, a, b, c, d) -> ReturnType:
def bbi(df, _, a, b, c, d) -> ReturnType:
"""Calculates BBI (Bull and Bear Index) which is the average of
ma:3, ma:6, ma:12, ma:24 by default
"""
Expand Down

0 comments on commit 59e3879

Please sign in to comment.