Commit 1300a1b
committed
Deal with missing type info in microgrid API calls
grpc.aio doesn't have type information, and there are all sorts of
tricks in it, so some funtions that look like they are not async really
are (because they return a awaitable). For example [`unary_unary()`]
returns a [`UnaryUnaryMultiCallable`] which returns a [`UnaryUnaryCall`]
which is `awaitable`.
Also there seem to be wrong type info regarding `SetBounds()`, saying
`request_iterator` is a required argument but it is not.
[`stream_unary()`] returns a [`StreamUnaryMultiCallable`] which takes an
optional `request_iterator`.
[`unary_unary()`]: https://github.com/grpc/grpc/blob/v1.51.3/src/python/grpcio/grpc/aio/_base_channel.py#L271-L276
[`UnaryUnaryMultiCallable`]: https://github.com/grpc/grpc/blob/v1.51.3/src/python/grpcio/grpc/aio/_base_channel.py#L28-L41
[`UnaryUnaryCall`]: https://github.com/grpc/grpc/blob/v1.51.3/src/python/grpcio/grpc/aio/_base_call.py#L138-L149
['stream_unary()']: https://github.com/grpc/grpc/blob/v1.51.3/src/python/grpcio/grpc/aio/_base_channel.py#L313-L318
[`StreamUnaryMultiCallable`]: https://github.com/grpc/grpc/blob/v1.51.3/src/python/grpcio/grpc/aio/_base_channel.py#L106-L118
Signed-off-by: Leandro Lucarella <[email protected]>1 parent e6bc6cd commit 1300a1b
1 file changed
+41
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
10 | 20 | | |
11 | 21 | | |
12 | 22 | | |
| |||
210 | 220 | | |
211 | 221 | | |
212 | 222 | | |
| 223 | + | |
| 224 | + | |
213 | 225 | | |
214 | 226 | | |
215 | | - | |
216 | | - | |
| 227 | + | |
| 228 | + | |
217 | 229 | | |
218 | 230 | | |
219 | 231 | | |
| |||
266 | 278 | | |
267 | 279 | | |
268 | 280 | | |
269 | | - | |
270 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
271 | 289 | | |
272 | 290 | | |
273 | 291 | | |
| |||
321 | 339 | | |
322 | 340 | | |
323 | 341 | | |
324 | | - | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
325 | 345 | | |
326 | 346 | | |
327 | 347 | | |
| |||
550 | 570 | | |
551 | 571 | | |
552 | 572 | | |
| 573 | + | |
| 574 | + | |
553 | 575 | | |
554 | 576 | | |
555 | 577 | | |
556 | 578 | | |
557 | | - | |
558 | | - | |
| 579 | + | |
| 580 | + | |
559 | 581 | | |
| 582 | + | |
| 583 | + | |
560 | 584 | | |
561 | 585 | | |
562 | 586 | | |
563 | 587 | | |
564 | 588 | | |
565 | | - | |
566 | | - | |
| 589 | + | |
| 590 | + | |
567 | 591 | | |
568 | 592 | | |
569 | 593 | | |
| |||
600 | 624 | | |
601 | 625 | | |
602 | 626 | | |
603 | | - | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
604 | 632 | | |
| 633 | + | |
| 634 | + | |
605 | 635 | | |
606 | 636 | | |
607 | 637 | | |
| |||
0 commit comments