Skip to content

Add script to generate abstract.pyi stub#746

Open
AchmadFathoni wants to merge 1 commit intoTA-Lib:masterfrom
AchmadFathoni:generate_abstract_pyi
Open

Add script to generate abstract.pyi stub#746
AchmadFathoni wants to merge 1 commit intoTA-Lib:masterfrom
AchmadFathoni:generate_abstract_pyi

Conversation

@AchmadFathoni
Copy link

Usage: $ python tools/generate_abstract_stub.py > talib/abstract.pyi closes #745

@mrjbq7
Copy link
Member

mrjbq7 commented Mar 6, 2026

Should we instead have types on the inputs

@overload
def HT_DCPHASE(real: np.ndarray) -> np.ndarray: ...
@overload
def HT_DCPHASE(real: pd.Series) -> pd.Series: ...

Usage: `$ python tools/generate_abstract_stub.py > talib/abstract.pyi`
@AchmadFathoni AchmadFathoni force-pushed the generate_abstract_pyi branch from 8a4f229 to e5cb488 Compare March 7, 2026 02:31
@AchmadFathoni
Copy link
Author

AchmadFathoni commented Mar 7, 2026

Good idea, I make it union since after running a test for single and multi return indicator I got

function input output
EMA numpy numpy
  series numpy
  df series
BBANDS numpy list of numpy
  series list of numpy
  df df

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request abstract.pyi stub

2 participants