Skip to content

fix: 修复插件元数据适配器中存在非字符串报错的问题#383

Merged
he0119 merged 2 commits intomainfrom
fix/none-adapter
May 5, 2025
Merged

fix: 修复插件元数据适配器中存在非字符串报错的问题#383
he0119 merged 2 commits intomainfrom
fix/none-adapter

Conversation

@he0119
Copy link
Copy Markdown
Member

@he0119 he0119 commented May 5, 2025

Copilot AI review requested due to automatic review settings May 5, 2025 10:55
@github-actions github-actions Bot added the bug Something isn't working label May 5, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request addresses an issue where non-string values in the plugin metadata adapter’s supported adapters raise an incorrect error message.

  • Updated the validator in src/providers/validation/models.py to detect non-string elements in a collection
  • Added a new test in tests/providers/validation/fields/test_plugin_supported_adapters.py to confirm proper error handling
  • Updated CHANGELOG.md to document the fix

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
tests/providers/validation/fields/test_plugin_supported_adapters.py Added test case to validate the error when non-string values are present in supported_adapters
src/providers/validation/models.py Modified supported_adapters_validator to add a check for non-string items
CHANGELOG.md Updated changelog with the fix description

Comment thread src/providers/validation/models.py
@codecov
Copy link
Copy Markdown

codecov Bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.67%. Comparing base (9b00122) to head (9b14f18).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #383   +/-   ##
=======================================
  Coverage   93.66%   93.67%           
=======================================
  Files          41       41           
  Lines        2274     2276    +2     
=======================================
+ Hits         2130     2132    +2     
  Misses        144      144           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BigOrangeQWQ BigOrangeQWQ self-assigned this May 5, 2025
@he0119 he0119 merged commit 263ec74 into main May 5, 2025
7 checks passed
@he0119 he0119 deleted the fix/none-adapter branch May 5, 2025 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants