Skip to content
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

Add return type annotations for buy and sell methods #975

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ivaigult
Copy link

@ivaigult ivaigult commented May 2, 2023

The return type annotations are now added for buy and sell methods. The documentation is updated to mention that the Order is returned. Now it should be crystal clear how to cancel a non-executed order (#957).

Additionally, annotations are now explicitly imported everywhere to improve compatibility and importing time.

Type annotations are now explicitly imported
from `__future__` to allow forward references
and postponed evaluation (faster import time).
See PEP 563 for details.
The return type annotations are now added for `buy`
and `sell` methods. The documentation is updated to
mention that the `Order` is returned. Now it should
be crystal clear how to cancel a non-executed order.

This should address kernc#957.
@ivaigult
Copy link
Author

ivaigult commented May 3, 2023

Thank you for the review, @kernc!

I have not used github for quite some time, hehe. The doc suggests that you might need to approve workflow runs as I'm the first time contributor. Could you click the button for me, please?

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.

2 participants