Skip to content

Fit gpt #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v1.2.2
- 适配 GPT 4 大模型

# v1.2.1
- 处理多媒体签名问题

Expand Down
12 changes: 1 addition & 11 deletions src/mcp_server/core/cdn/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,7 @@ def prefetch_urls(self, **kwargs) -> list[types.TextContent]:
"maxItems": 10,
"description": "List of directory patterns to refresh (max 10 items). Must end with '/' or '/*' to indicate directory scope",
},
},
"anyOf": [ # 至少有一个是非空数组
{
"required": ["urls"],
"properties": {"urls": {"not": {"maxItems": 0}}},
},
{
"required": ["dirs"],
"properties": {"dirs": {"not": {"maxItems": 0}}},
},
],
}
},
)
)
Expand Down
10 changes: 1 addition & 9 deletions src/mcp_server/core/media_processing/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,7 @@ def image_scale_by_percent(
"minimum": 1
},
},
"required": ["object_url"],
"anyOf": [
{"required": ["width"]},
{"required": ["height"]}
]
"required": ["object_url"]
},
)
)
Expand Down Expand Up @@ -162,10 +158,6 @@ def image_scale_by_size(
},
},
"required": ["object_url"],
"anyOf": [
{"required": ["radius_x"]},
{"required": ["radius_y"]}
]
}
)
)
Expand Down
2 changes: 1 addition & 1 deletion src/mcp_server/core/version/version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

Copy link

Choose a reason for hiding this comment

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

Missing module docstring (missing-module-docstring)

Details

lint 解释

missing-module-docstring 是一个常见的代码质量检查,用于确保每个模块(即 .py 文件)都有一个文档字符串。文档字符串是位于文件顶部的字符串,通常用三引号括起来,用于描述模块的功能和用途。

错误用法

以下是一个缺少模块文档字符串的示例:

# version.py

def get_version():
    return "1.0.0"

在这个例子中,version.py 文件没有包含任何文档字符串。

正确用法

以下是添加了模块文档字符串的正确示例:

"""
This module provides functions to manage and retrieve the version information of the application.
"""

def get_version():
    return "1.0.0"

在这个例子中,version.py 文件顶部包含了一个文档字符串,描述了该模块的功能。


💡 以上内容由 AI 辅助生成,如有疑问欢迎反馈交流

VERSION = '1.2.1'
VERSION = '1.2.2'
Loading