Plot.theme currently accepts a dict[str, Any], which unfortunately throws a pytype typing error when passed another similar mapping, like an immutable dict.
def accepts_dict(d: dict[str, Any]) -> None:
print(d)
accepts_dict(immutabledict.immutabledict({'a': 1}))
# Error: Function accepts_dict was called with the wrong arguments [wrong-arg-types]
# Expected: (d: Dict[str, Any], ...)
# Actually passed: (d: immutabledict.immutabledict[nothing, nothing])
Using collections.abc.Mapping doesn't throw an error.
Plot.theme currently accepts a
dict[str, Any]
, which unfortunately throws a pytype typing error when passed another similar mapping, like an immutable dict.Using collections.abc.Mapping doesn't throw an error.
Would you mind relaxing the type specificity for this? Thanks!