Refactor code for improved readability and consistency

This commit is contained in:
begoniezhao
2025-12-01 18:15:39 +08:00
parent 5d6729fc0c
commit f5963276d6
8 changed files with 461 additions and 292 deletions
+7 -3
View File
@@ -4,7 +4,7 @@ WeKnora MCP Server 安装脚本
"""
from setuptools import setup
import os
# 读取 README 文件
def read_readme():
@@ -14,14 +14,18 @@ def read_readme():
except FileNotFoundError:
return "WeKnora MCP Server - Model Context Protocol server for WeKnora API"
# 读取依赖
def read_requirements():
try:
with open("requirements.txt", "r", encoding="utf-8") as f:
return [line.strip() for line in f if line.strip() and not line.startswith("#")]
return [
line.strip() for line in f if line.strip() and not line.startswith("#")
]
except FileNotFoundError:
return ["mcp>=1.0.0", "requests>=2.31.0"]
setup(
name="weknora-mcp-server",
version="1.0.0",
@@ -58,4 +62,4 @@ setup(
("", ["README.md", "requirements.txt", "LICENSE"]),
],
keywords="mcp model-context-protocol weknora knowledge-management api-server",
)
)