-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
Milestone
Description
Summary
Several functions currently return plain dict objects.
Migrating these return types to TypedDict will improve type safety, clarify return structures, and enhance the overall developer experience.
Motivation
Returning untyped dictionaries makes it difficult for static analysis tools and IDEs to guarantee key existence or value types.
Introducing TypedDict provides explicit structure and improves maintainability.
Pros
- Smaller impact on existing code compared to migrating to
dataclass - Clearer and more explicit return value structures
- Improved type safety and better IDE auto‑completion
- Enhanced static analysis accuracy (e.g., mypy)
Cons
TypedDictis not a subclass ofdict, so some existing code may raise type errors- This migration introduces breaking changes
Target Functions
-
ScoresCalculator.calculate_scores() -
Aotenjou.calculate_scores() -
FuCalculator.calculate_fu() -
count_tiles_by_suits()
Reactions are currently unavailable