Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better type validation for classes #678

Open
mvadari opened this issue Jan 31, 2024 · 0 comments · May be fixed by #708
Open

Better type validation for classes #678

mvadari opened this issue Jan 31, 2024 · 0 comments · May be fixed by #708
Labels
enhancement New feature or request

Comments

@mvadari
Copy link
Collaborator

mvadari commented Jan 31, 2024

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.

@mvadari mvadari added the enhancement New feature or request label Jan 31, 2024
@mvadari mvadari linked a pull request Sep 17, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant