You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now it's dict[str, set[str]], and attempt to use frozenset will return
TypeError: argument 'attributes': 'frozenset' object cannot be converted to 'PySet'
but IMO using frozenset is a good practice, because if data is immutable good to use immutable type, for example allowed attributes can be defined in configuration and it's safer to use immutable type.
The text was updated successfully, but these errors were encountered:
The TypeError comes from PyO3. It’s not clear to me from the PyO3 arg docs if there’s an easy way to allow all kinds of mappings or sets and have PyO3 convert them.
Thank you! Do you think it's possible to add support of MappingProxyType? As I understand it's only way to have read-only dictionaries without adding third-party libraries.
Now it's
dict[str, set[str]]
, and attempt to usefrozenset
will returnbut IMO using
frozenset
is a good practice, because if data is immutable good to use immutable type, for example allowed attributes can be defined in configuration and it's safer to use immutable type.The text was updated successfully, but these errors were encountered: