Commit 99793d9
committed
Add suggestions for pyright changes from review
Based on suggestions from @victorlin in review of
#530
1. Assert value instead of type to be consistent with other assertions
in the repo.
2. Use type narrowing instead of coercion
3. nextstrain_dot_org/download: Always write raw bytes
`iter_content` can potentially return bytes if the `response.encoding`
is None,¹ so just always write raw bytes.
¹ <https://github.com/psf/requests/blob/6404f345e562d962abe6700a1c357ec1e7e18232/src/requests/utils.py#L599-L600>1 parent 8cec798 commit 99793d9
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
| 459 | + | |
459 | 460 | | |
460 | | - | |
| 461 | + | |
461 | 462 | | |
462 | 463 | | |
463 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
390 | 390 | | |
391 | 391 | | |
392 | 392 | | |
393 | | - | |
394 | | - | |
395 | | - | |
| 393 | + | |
| 394 | + | |
396 | 395 | | |
397 | 396 | | |
398 | 397 | | |
| |||
825 | 824 | | |
826 | 825 | | |
827 | 826 | | |
828 | | - | |
| 827 | + | |
829 | 828 | | |
830 | 829 | | |
831 | 830 | | |
| |||
0 commit comments