chore: perform widespread code cleanup and formatting
Perform a comprehensive code cleanup across multiple modules to improve code quality, consistency, and maintainability. Key changes include: - Removing numerous unused imports. - Standardizing import order. - Eliminating trailing whitespace and inconsistent newlines. - Updating legacy type hints to modern syntax (e.g., `List` -> `list`). - Making minor improvements for code robustness and style.
This commit is contained in:
@@ -269,7 +269,7 @@ class RelationshipFetcher:
|
||||
platform = "unknown"
|
||||
if existing_stream:
|
||||
# 从现有记录获取platform
|
||||
platform = getattr(existing_stream, 'platform', 'unknown') or "unknown"
|
||||
platform = getattr(existing_stream, "platform", "unknown") or "unknown"
|
||||
logger.debug(f"从现有ChatStream获取到platform: {platform}, stream_id: {stream_id}")
|
||||
else:
|
||||
logger.debug(f"未找到现有ChatStream记录,使用默认platform: unknown, stream_id: {stream_id}")
|
||||
|
||||
Reference in New Issue
Block a user