Add typing, guards, and refactors across models & routers#1017
Merged
YoshihitoAso merged 8 commits intodev-26.6from Apr 6, 2026
Merged
Add typing, guards, and refactors across models & routers#1017YoshihitoAso merged 8 commits intodev-26.6from
YoshihitoAso merged 8 commits intodev-26.6from
Conversation
Add type annotations, runtime guards and small refactors across the codebase to improve safety and typing.
Replace bulk SemaphoreTaskGroup.run(...) tuple-based calls with an explicit async with SemaphoreTaskGroup and individual create_task calls for each contract function in app/model/ibet/token.py.
Remove the custom __init__ that popped a 'personal_info' kwarg and assigned it to self.personal_info.
purplesmoke05
approved these changes
Apr 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several improvements and refactorings across the database models and contract interaction logic, focusing on type safety, error handling, and code clarity.
📌 Description
✅ Related Issues
🔄 Changes
Type Annotations and Type Safety Improvements:
personal_info.pyandfreeze_log.py.Error Handling and Assertions:
Refactoring and Code Clarity:
cast()from thetypingmodule to clarify expected types when dealing with dynamic data (e.g., keyfiles, KMS results, and contract call returns), improving code readability and reducing runtime errors.IDXPersonalInfoto better handle initialization with optional arguments.decode_keyfile_jsonfrometh_keyfile.keyfile.📌 Checklist