[PR #2] [MERGED] chore: Apply ruff formatter and linter #76

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

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-sdks/pull/2
Author: @laipz8200
Created: 12/2/2024
Status: Merged
Merged: 12/3/2024
Merged by: @Yeuoly

Base: mainHead: chore/apply-ruff-formatter-and-linter


📝 Commits (10+)

  • 43a1a30 feat: Add .ruff.toml
  • 5858fe7 chore: Apply formet and auto fix
  • 37128ae chore: Apply unsafe auto-fixes and check manually
  • b3e0612 chore: Apply format
  • 4551f79 chore: Fix lines-too-long
  • deb1216 refactor: Use pathlib instead of open.
  • 63d84d6 fix(llm.py): Use clearly variable name.
  • c58be38 fix(plugin_executor): Yield data then return
  • 75cec12 refactor(tts.py): Use context manager instead of __enter__()
  • 105606e refactor: Remove un-needed bool

📊 Changes

102 files changed (+1025 additions, -1365 deletions)

View changed files

python/.ruff.toml (+44 -0)
📝 python/dify_plugin/__init__.py (+18 -23)
📝 python/dify_plugin/config/config.py (+7 -18)
📝 python/dify_plugin/core/entities/message.py (+4 -7)
📝 python/dify_plugin/core/entities/plugin/io.py (+0 -1)
📝 python/dify_plugin/core/entities/plugin/request.py (+8 -1)
📝 python/dify_plugin/core/plugin_executor.py (+55 -129)
📝 python/dify_plugin/core/plugin_registration.py (+28 -41)
📝 python/dify_plugin/core/runtime.py (+45 -51)
📝 python/dify_plugin/core/server/__base/filter_reader.py (+3 -7)
📝 python/dify_plugin/core/server/__base/request_reader.py (+3 -6)
📝 python/dify_plugin/core/server/__base/response_writer.py (+6 -21)
📝 python/dify_plugin/core/server/__base/writer_entities.py (+6 -5)
📝 python/dify_plugin/core/server/aws/request_reader.py (+6 -2)
📝 python/dify_plugin/core/server/aws/response_writer.py (+3 -1)
📝 python/dify_plugin/core/server/io_server.py (+9 -11)
📝 python/dify_plugin/core/server/router.py (+6 -10)
📝 python/dify_plugin/core/server/stdio/request_reader.py (+6 -9)
📝 python/dify_plugin/core/server/stdio/response_writer.py (+2 -1)
📝 python/dify_plugin/core/server/tcp/request_reader.py (+12 -15)

...and 80 more files

📄 Description

  1. Add .ruff.toml file.
  2. Apply ruff format.
  3. Apply ruff check.
  4. Fix some bugs.

🔄 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/2 **Author:** [@laipz8200](https://github.com/laipz8200) **Created:** 12/2/2024 **Status:** ✅ Merged **Merged:** 12/3/2024 **Merged by:** [@Yeuoly](https://github.com/Yeuoly) **Base:** `main` ← **Head:** `chore/apply-ruff-formatter-and-linter` --- ### 📝 Commits (10+) - [`43a1a30`](https://github.com/langgenius/dify-plugin-sdks/commit/43a1a304150e21f1c4acd7edb44205d360ab8a24) feat: Add `.ruff.toml` - [`5858fe7`](https://github.com/langgenius/dify-plugin-sdks/commit/5858fe715e9e951bda7bc2e7e2e0c92332a2faab) chore: Apply formet and auto fix - [`37128ae`](https://github.com/langgenius/dify-plugin-sdks/commit/37128aeadd2eb37597a8e564dc48546de83b9695) chore: Apply unsafe auto-fixes and check manually - [`b3e0612`](https://github.com/langgenius/dify-plugin-sdks/commit/b3e0612e5354a878d82bd437b147131950cb640b) chore: Apply format - [`4551f79`](https://github.com/langgenius/dify-plugin-sdks/commit/4551f79ca32f982040daf20422f175f4939cbe7f) chore: Fix lines-too-long - [`deb1216`](https://github.com/langgenius/dify-plugin-sdks/commit/deb1216d014235024c91ec171af61e83a2314d23) refactor: Use `pathlib` instead of `open`. - [`63d84d6`](https://github.com/langgenius/dify-plugin-sdks/commit/63d84d6ae3da1a2d1cb089b504d9b7113891c526) fix(llm.py): Use clearly variable name. - [`c58be38`](https://github.com/langgenius/dify-plugin-sdks/commit/c58be380476fdc4c0c2ede31ab920bf4ac146dc8) fix(plugin_executor): Yield data then return - [`75cec12`](https://github.com/langgenius/dify-plugin-sdks/commit/75cec127f45f0efb6577aa0d53f22e4696817961) refactor(tts.py): Use context manager instead of `__enter__()` - [`105606e`](https://github.com/langgenius/dify-plugin-sdks/commit/105606e34b7148b7c7fd7e5655f739e5d93ab3cf) refactor: Remove un-needed bool ### 📊 Changes **102 files changed** (+1025 additions, -1365 deletions) <details> <summary>View changed files</summary> ➕ `python/.ruff.toml` (+44 -0) 📝 `python/dify_plugin/__init__.py` (+18 -23) 📝 `python/dify_plugin/config/config.py` (+7 -18) 📝 `python/dify_plugin/core/entities/message.py` (+4 -7) 📝 `python/dify_plugin/core/entities/plugin/io.py` (+0 -1) 📝 `python/dify_plugin/core/entities/plugin/request.py` (+8 -1) 📝 `python/dify_plugin/core/plugin_executor.py` (+55 -129) 📝 `python/dify_plugin/core/plugin_registration.py` (+28 -41) 📝 `python/dify_plugin/core/runtime.py` (+45 -51) 📝 `python/dify_plugin/core/server/__base/filter_reader.py` (+3 -7) 📝 `python/dify_plugin/core/server/__base/request_reader.py` (+3 -6) 📝 `python/dify_plugin/core/server/__base/response_writer.py` (+6 -21) 📝 `python/dify_plugin/core/server/__base/writer_entities.py` (+6 -5) 📝 `python/dify_plugin/core/server/aws/request_reader.py` (+6 -2) 📝 `python/dify_plugin/core/server/aws/response_writer.py` (+3 -1) 📝 `python/dify_plugin/core/server/io_server.py` (+9 -11) 📝 `python/dify_plugin/core/server/router.py` (+6 -10) 📝 `python/dify_plugin/core/server/stdio/request_reader.py` (+6 -9) 📝 `python/dify_plugin/core/server/stdio/response_writer.py` (+2 -1) 📝 `python/dify_plugin/core/server/tcp/request_reader.py` (+12 -15) _...and 80 more files_ </details> ### 📄 Description 1. Add `.ruff.toml` file. 2. Apply `ruff format`. 3. Apply `ruff check`. 4. Fix some bugs. --- <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:15:39 -05:00
yindo closed this issue 2026-02-15 21:15:39 -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#76