Skip to content

Add script to generate abstract.pyi stub - #746

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

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

Conversation

@AchmadFathoni

Copy link
Copy Markdown
Contributor

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

@mrjbq7

Copy link
Copy Markdown
Member

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 commented Mar 7, 2026

Copy link
Copy Markdown
ContributorAuthor

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

functioninputoutput
EMAnumpynumpy
seriesnumpy
dfseries
BBANDSnumpylist of numpy
serieslist of numpy
dfdf

@mrjbq7
mrjbq7 merged commit 4478b33 into TA-Lib:masterMar 8, 2026
@mrjbq7

Copy link
Copy Markdown
Member

Thanks!

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

@AchmadFathoni@mrjbq7