[PR #132] [MERGED] chore: mark constructors as final in multiple classes #170

Closed
opened 2026-02-15 21:16:04 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/132
Author: @Yeuoly
Created: 5/7/2025
Status: Merged
Merged: 5/7/2025
Merged by: @Yeuoly

Base: mainHead: chore/add-final-to-methods


📝 Commits (1)

  • 85acad9 feat: mark constructors as final in multiple classes

📊 Changes

4 files changed (+32 additions, -3 deletions)

View changed files

📝 python/dify_plugin/interfaces/agent/__init__.py (+8 -1)
📝 python/dify_plugin/interfaces/endpoint/__init__.py (+8 -0)
📝 python/dify_plugin/interfaces/model/ai_model.py (+8 -1)
📝 python/dify_plugin/interfaces/tool/__init__.py (+8 -1)

📄 Description

  • Added @final decorator to the constructors of AgentStrategy, Endpoint, AIModel, and Tool classes to prevent overriding.
  • Included documentation notes in each constructor to indicate that they should not be overridden.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-sdks/pull/132 **Author:** [@Yeuoly](https://github.com/Yeuoly) **Created:** 5/7/2025 **Status:** ✅ Merged **Merged:** 5/7/2025 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `chore/add-final-to-methods` --- ### 📝 Commits (1) - [`85acad9`](https://github.com/langgenius/dify-plugin-sdks/commit/85acad958c92840eaaabaf8767b44a6b1afad8b4) feat: mark constructors as final in multiple classes ### 📊 Changes **4 files changed** (+32 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `python/dify_plugin/interfaces/agent/__init__.py` (+8 -1) 📝 `python/dify_plugin/interfaces/endpoint/__init__.py` (+8 -0) 📝 `python/dify_plugin/interfaces/model/ai_model.py` (+8 -1) 📝 `python/dify_plugin/interfaces/tool/__init__.py` (+8 -1) </details> ### 📄 Description - Added `@final` decorator to the constructors of `AgentStrategy`, `Endpoint`, `AIModel`, and `Tool` classes to prevent overriding. - Included documentation notes in each constructor to indicate that they should not be overridden. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-15 21:16:04 -05:00
yindo closed this issue 2026-02-15 21:16:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-sdks#170