[PR #25281] [Chore/Refactor] Improve type annotations in models module #30992

Closed
opened 2026-02-21 20:48:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/25281

State: closed
Merged: Yes


Summary

  • Enhanced type annotations throughout the models module
  • Fixed mypy and pyright type checking errors
  • Improved code maintainability and type safety

Fixes #25280

Changes Made

  • Added proper type hints to methods and properties in models/account.py, models/dataset.py, models/model.py, models/workflow.py, and models/types.py
  • Fixed type incompatibilities and removed unnecessary type ignores
  • Enhanced type safety for JSON fields and dictionary operations
  • Improved type annotations for Flask-Login integration
  • Fixed enum typing issues with proper string type annotations
**Original Pull Request:** https://github.com/langgenius/dify/pull/25281 **State:** closed **Merged:** Yes --- ## Summary - Enhanced type annotations throughout the models module - Fixed mypy and pyright type checking errors - Improved code maintainability and type safety Fixes #25280 ## Changes Made - Added proper type hints to methods and properties in models/account.py, models/dataset.py, models/model.py, models/workflow.py, and models/types.py - Fixed type incompatibilities and removed unnecessary type ignores - Enhanced type safety for JSON fields and dictionary operations - Improved type annotations for Flask-Login integration - Fixed enum typing issues with proper string type annotations
yindo added the pull-request label 2026-02-21 20:48:37 -05:00
yindo closed this issue 2026-02-21 20:48:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30992