Skip to content

Add script to generate abstract.pyi stub#746

Merged
mrjbq7 merged 1 commit intoTA-Lib:masterfrom
AchmadFathoni:generate_abstract_pyi
Mar 8, 2026
Merged

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

Conversation

@AchmadFathoni
Copy link
Contributor

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
Contributor 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

@mrjbq7 mrjbq7 merged commit 4478b33 into TA-Lib:master Mar 8, 2026
@mrjbq7
Copy link
Member

mrjbq7 commented Mar 8, 2026

Thanks!

@AchmadFathoni AchmadFathoni deleted the generate_abstract_pyi branch March 8, 2026 01:02
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