Skip to main content
4 events
when toggle format what by license comment
yesterday comment added J_H Ummm, maybe I misread what your key is? I kind of thought the integer season was in there, but I'm certainly prepared to say I was wrong. If we're mapping from string to a dictionary, then yeah, annotate it as such. Of course mapping to just a dict is on the vague side, and mypy --strict or pyright might call you out on it. Perhaps we're mapping to a dict[str, int|str], or mapping to a dict[str, Any] ?
yesterday vote accept Luca
yesterday comment added Luca Great advice! Would -> dict[tuple[str, int], str]: be better as -> dict[str, dict]: ? . Output = {'league': {'id': 39, 'name': 'Premier League', 'country': 'England', 'season': 2022}, 'team': ...
2 days ago history answered J_H CC BY-SA 4.0