Repository navigation
Commit 60fd2c8
committed
fix: use hasattr guard instead of getattr for response.output
Fixes microsoft#6235
Using hasattr(response, 'output') and then accessing response.output
directly gives pyright enough type information to verify the match
statement exhaustiveness. This avoids the cast(list[Any]) approach
which pyright still flagged as partially unknown.1 parent 230c8a3 commit 60fd2c8
1 file changed
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1971 | 1971 | | |
1972 | 1972 | | |
1973 | 1973 | | |
1974 | | - | |
| 1974 | + | |
| 1975 | + | |
| 1976 | + | |
| 1977 | + | |
1975 | 1978 | | |
1976 | 1979 | | |
1977 | 1980 | | |
| |||
0 commit comments