The library uses mypy internally to keep types accurate, but most people don't type their Python code. This means that a lot of people who accidentally use the wrong type when filling in a transaction/request don't get a very clean error response. The most common example of this is people who accidentally put in a Wallet object instead of a str for an account or destination.
It would be very helpful to these people to add better validation for these types. This should be easily doable for all types with some metaprogramming, similar to how from_dict works.
The library uses
mypy
internally to keep types accurate, but most people don't type their Python code. This means that a lot of people who accidentally use the wrong type when filling in a transaction/request don't get a very clean error response. The most common example of this is people who accidentally put in aWallet
object instead of astr
for an account or destination.It would be very helpful to these people to add better validation for these types. This should be easily doable for all types with some metaprogramming, similar to how
from_dict
works.