Commit eefff87
authored
DOC: Add return type annotations for buy and sell methods (#975)
* ENH: Explicitly import annotations everywhere
Type annotations are now explicitly imported
from `__future__` to allow forward references
and postponed evaluation (faster import time).
See PEP 563 for details.
* ENH: add return type annotations for `buy`/`sell`
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 #957.1 parent e92763b commit eefff87
File tree
6 files changed
+21
-5
lines changed- backtesting
- test
6 files changed
+21
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
8 | 11 | | |
9 | 12 | | |
10 | 13 | | |
| |||
200 | 203 | | |
201 | 204 | | |
202 | 205 | | |
203 | | - | |
| 206 | + | |
204 | 207 | | |
205 | | - | |
| 208 | + | |
| 209 | + | |
206 | 210 | | |
207 | 211 | | |
208 | 212 | | |
| |||
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
221 | | - | |
| 225 | + | |
222 | 226 | | |
223 | | - | |
| 227 | + | |
| 228 | + | |
224 | 229 | | |
225 | 230 | | |
226 | 231 | | |
| |||
745 | 750 | | |
746 | 751 | | |
747 | 752 | | |
748 | | - | |
| 753 | + | |
749 | 754 | | |
750 | 755 | | |
751 | 756 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
2 | 5 | | |
3 | 6 | | |
4 | 7 | | |
| |||
0 commit comments