Commit 13ccbe4
committed
fix: use strict int type check to satisfy static type checker
Pyright correctly flags that `isinstance(to, bool)` doesn't narrow the
`str | int` union since `bool` is a subclass of `int`. Use `type(to) is int`
for a strict exact-type check that both satisfies the type checker and
correctly excludes booleans.1 parent ebd79bd commit 13ccbe4
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments