refactor(app): improve code readability and consistency in FileMonitorHandler

- Rename 'size' parameter to 'file_size' in on_created and on_moved methods
- This change enhances code clarity and maintains consistency with other parts of the codebase
This commit is contained in:
Attente
2024-12-28 20:05:47 +08:00
parent 51c7852b77
commit 3ea0b1f36b

View File

@@ -40,11 +40,11 @@ class FileMonitorHandler(FileSystemEventHandler):
def on_created(self, event: FileSystemEvent):
self.callback.event_handler(event=event, text="创建", event_path=event.src_path,
size=Path(event.src_path).stat().st_size)
file_size=Path(event.src_path).stat().st_size)
def on_moved(self, event: FileSystemMovedEvent):
self.callback.event_handler(event=event, text="移动", event_path=event.dest_path,
size=Path(event.dest_path).stat().st_size)
file_size=Path(event.dest_path).stat().st_size)
class Monitor(metaclass=Singleton):