google-deepmind / google-deepmind/tree

pylint E1136: Value 'tree.Structure' is unsubscriptable

Open
#134 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1k
Forks
73
PR merge metrics
No merged PRs in 30d

Description

Hi, thanks for this package! I get the pylint error in the title when I use `tree.Structure`, even though `tree.StructureKV` works fine. Is there a way to resolves this besides using `tree.StructureKV[str, V]` explicitly?

`example.py`:
```python
import tree

def f(x: tree.StructureKV[str, int]):
print(x)

def g(x: tree.Structure[int]):
print(x)
```

To reproduce:
```bash
$ pylint --disable=C example.py
************* Module example
example.py:6:9: E1136: Value 'tree.Structure' is unsubscriptable (unsubscriptable-object)
------------------------------------------------------------------
Your code has been rated at 0.00/10 (previous run: 0.00/10, +0.00)
```

Version info:
```bash
$ python --version
Python 3.13.9
$ python -c "import tree; print(tree.__version__)"
0.1.9
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.