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
AttributeDict and it's parent classes use Mapping[TKey, TValue] for typing, but in practice they often have multiple types in a single structure, at least in the values (strings, ints, hexbytes, etc.)
Consider changing the type, either by being more specific, or opening it to Any, as a user could theoretically turn any mapping into an AttributeDict.
Also, since an AttributeDict is expected to be a hashable datastructure, consider doing recursive tupleization/checking for unhashable types at the time of creation, instead of only when trying to hash it.
The text was updated successfully, but these errors were encountered:
Also, since an AttributeDict is expected to be a hashable datastructure, consider doing recursive tupleization/checking for unhashable types at the time of creation, instead of only when trying to hash it.
I guess I didn't address this part but I feel like we shouldn't change the types that aren't assigned internally, especially if it is indeed declared at the type-hinting level. I'd rather only use it when hashing, as we currently do.
AttributeDict
and it's parent classes useMapping[TKey, TValue]
for typing, but in practice they often have multiple types in a single structure, at least in the values (strings, ints, hexbytes, etc.)Consider changing the type, either by being more specific, or opening it to
Any
, as a user could theoretically turn any mapping into anAttributeDict
.Also, since an
AttributeDict
is expected to be a hashable datastructure, consider doing recursive tupleization/checking for unhashable types at the time of creation, instead of only when trying to hash it.The text was updated successfully, but these errors were encountered: