Commit 410dcff
committed
fix: add __future__ annotations to resolve 'function' object is not subscriptable
The CollectionStore class defines a method named `list` (line 123). In Python,
class-body annotations are evaluated eagerly in the class namespace. After the
`list` method is defined, any annotation using `list[...]` (lines 222, 255, 287,
299, 312, 327) resolves to the method object rather than the built-in list type,
causing TypeError: 'function' object is not subscriptable at class definition time.
Adding `from __future__ import annotations` defers all annotation evaluation to
string form, avoiding the name-shadowing issue without changing any runtime logic.
https://claude.ai/code/session_01U6Cp66NKhLL8k8VRifboXk1 parent 1921a29 commit 410dcff
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
| |||
0 commit comments