Commit b4d8f9a
authored
fix: add overloads to
## Summary
`AsyncSession.send()` returns `Response | AsyncResponse` without
narrowing based on the `stream` parameter, unlike `request()`, `get()`,
`post()`, and other public methods which already have `@overload` stubs.
## Fix
Adds `@typing.overload` stubs to `AsyncSession.send()` so the return
type is narrowed based on `stream`:
- `stream=True` → `AsyncResponse`
- default → `Response`AsyncSession.send() for stream-dependent return type (#335)1 parent 631baf1 commit b4d8f9a
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
453 | 459 | | |
454 | 460 | | |
455 | 461 | | |
| |||
0 commit comments