Files
playwrite/interfaces/i_deletion_checker.py
Misaka_Company 5024384c73 refactor: restructure main_clean.py with dependency injection and interfaces
Refactor discrete material cleaner to improve maintainability and testability:

- Introduce dependency injection pattern for service components
- Add interfaces (IPageNavigator, IMaterialExtractor, IDeletionChecker)
- Extract PageNavigator service for page navigation logic
- Extract MaterialExtractor service for data extraction
- Extract DatabaseDeletionChecker service for deletion logic
- Add MaterialInfo data model for structured data
- Centralize configuration (CleanerConfig, UIConstants)
- Implement separation of concerns across services layer

Also includes comprehensive execution mechanism documentation.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 14:17:37 +08:00

25 lines
485 B
Python

"""
删除判断接口
定义判断物料是否需要删除的抽象接口
"""
from abc import ABC, abstractmethod
from models.material_info import MaterialInfo
class IDeletionChecker(ABC):
"""删除判断接口"""
@abstractmethod
def should_delete(self, material: MaterialInfo) -> bool:
"""
判断物料是否需要删除
Args:
material: 物料信息对象
Returns:
是否需要删除
"""
pass