I'm trying to understand how to make this work:
def someMethod() -> dict[any, any]:
if not os.path.exists('some path'):
return {}
config = {'a': 1, 'b': 2}
return config
I don't think that's correct. Seeing this error - Declared return type, "dict[Unknown, Unknown]", is partially unknownPylance
The idea is to return empty dict if a path doesn't exist (or on some condition) or correct dict with key-value pairs.
Any ideas?