I've defined a function like this
def map_json_to_item_dictionary(json: dict[str, dict]) -> dict[int, Any]:
result: dict[int, Any] = {}
return result
but have an exception 'type' object is not subscriptable at function definition
PyCharm also prompt an exception Class 'type' does not define '__getitem__', so the
[] operator cannot be used on its instances
Look like python try to access something from dict
.
What I made wrong?