This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JacobHayes
Recipients JacobHayes
Date 2021-10-03.22:18:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org>
In-reply-to
Content
Reproduction:

```
from graphlib import TopologicalSorter

TopologicalSorter[str]({"a": {}, "b": {"a"}})
```
```
$ mypy /tmp/toposort.py
Success: no issues found in 1 source file
$ python3 /tmp/toposort.py
Traceback (most recent call last):
  File "/tmp/toposort.py", line 3, in <module>
    TopologicalSorter[str]({"a": {}, "b": {"a"}})
TypeError: 'type' object is not subscriptable
```

I opened the issue here (rather than typeshed) because we'd presumably like to support this at runtime too.

Typeshed link: https://github.com/python/mypy/blob/0a830481980bfc554ded61a3eaaaecde384a21e4/mypy/typeshed/stdlib/graphlib.pyi#L6
History
Date User Action Args
2021-10-03 22:18:50JacobHayessetrecipients: + JacobHayes
2021-10-03 22:18:50JacobHayessetmessageid: <1633299530.43.0.181161136207.issue45359@roundup.psfhosted.org>
2021-10-03 22:18:50JacobHayeslinkissue45359 messages
2021-10-03 22:18:50JacobHayescreate