Commit cfc9a09
committed
fix(memory): move Sequence to TYPE_CHECKING block, use hasattr for backend detection
- Import Sequence under TYPE_CHECKING to satisfy ruff UP035/TC003
- Use hasattr instead of isinstance(Protocol) for backend detection
since runtime_checkable checks class attrs, not instance attrs,
breaking MagicMock-based tests on Python 3.12+1 parent 03bada8 commit cfc9a09
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | 22 | | |
| |||
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
49 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
50 | 55 | | |
51 | 56 | | |
52 | 57 | | |
| |||
0 commit comments