diff --git a/src/data_process_model/shared_memory_cache.py b/src/data_process_model/shared_memory_cache.py index 4b05edc..443ea58 100644 --- a/src/data_process_model/shared_memory_cache.py +++ b/src/data_process_model/shared_memory_cache.py @@ -264,7 +264,7 @@ class SharedMemoryKlineCache: print(f"❌ 批量添加K线数据到共享内存失败: {e}") return 0 - def get_kline_data(self, stock_code: str = None, limit: int = 100) -> dict: + def get_kline_data(self, stock_code: Optional[str] = None, limit: int = 100) -> dict: """ 从共享内存获取K线数据 @@ -351,7 +351,7 @@ class SharedMemoryKlineCache: except Exception as e: return {'status': 'error', 'error': str(e)} - def clear_cache(self, stock_code: str = None) -> bool: + def clear_cache(self, stock_code: Optional[str] = None) -> bool: """清理缓存数据""" with self.lock: try: