-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate ta-lib function definitions. #212
base: master
Are you sure you want to change the base?
Conversation
This module generates ta-lib function definitions along with docstrings. Generated .py file then can be used by developers more easily because of already provided function parameters and docstring.
Is this mainly for the Abstract API? The Function API already has docstrings like this:
|
I wonder if we can change the abstract api to generate these docstrings automatically when it constructs itself, rather than using a wrapper module like this. |
AFAIK that is not possible since dosctrings can't be provided dynamically. |
This would be very helpful |
Came here to propose such change. Would be great if this was accepted. |
I updated and fixed the generator script so here it is: talibgen.py.txt |
I think it is possible:
|
@mrjbq7 Above I've said this:
Actually it is possible to add docstring dynamically, but that won't help for code autocompletion. |
Is the issue that the tools parsing files for doc strings aren’t able to handle a callable created dynamically with a correct docstring?On Apr 14, 2023, at 12:14 AM, Ramazan Polat ***@***.***> wrote:
@mrjbq7
My solution puts docstring along with function parameters into generated function body, once this is done IDE will be able to read from that docstring when that function name is typed by the developer. Hence IDE can assist developer by auto complete because IDE already knows about parameters of the function and docstring. This is the idea behind generating functions along with proper parameters and docstrings.
Above I've said this:
AFAIK that is not possible since dosctrings can't be provided dynamically.
Actually it is possible to add docstring dynamically, but that won't help for code autocompletion.
In order to have code autocompletion, the IDE must see the docstring and parameters before you run the code. Hence providing a docstring dynamically won't help.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
This module generates ta-lib function definitions along with docstrings. Generated .py file then can be used by developers more easily because of already provided function parameters and docstring.
Instructions:
1- Install ta-lib
2- Run
tafungen.py
3- You will have a
tafun.py
file4- Import
tafun.py
and use it happily.Sample generated
tafun.py
file content: