From 502b21567bf21c5b7fea5ebb4edf22c316bb0967 Mon Sep 17 00:00:00 2001 From: Roman Glushko Date: Tue, 2 Jan 2024 12:12:51 +0200 Subject: [PATCH] #31 added typing for event constructors --- notifykit/_notifykit_lib.pyi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/notifykit/_notifykit_lib.pyi b/notifykit/_notifykit_lib.pyi index 527fc58..9f2b6df 100644 --- a/notifykit/_notifykit_lib.pyi +++ b/notifykit/_notifykit_lib.pyi @@ -52,32 +52,48 @@ class AccessEvent: access_type: AccessType access_mode: Optional[AccessMode] + def __init__(self, path: str, access_type: AccessType, access_mode: Optional[AccessMode]) -> None: ... + class CreateEvent: path: Path file_type: ObjectType + def __init__(self, path: str, file_type: ObjectType) -> None: ... + class ModifyDataEvent: path: Path data_type: DataType + def __init__(self, path: str, data_type: DataType) -> None: ... + class ModifyMetadataEvent: path: Path metadata_type: MetadataType + def __init__(self, path: str, metadata_type: MetadataType) -> None: ... + class ModifyOtherEvent: path: Path + def __init__(self, path: str) -> None: ... + class ModifyUnknownEvent: path: Path + def __init__(self, path: str) -> None: ... + class DeleteEvent: path: Path file_type: ObjectType + def __init__(self, path: str, file_type: ObjectType) -> None: ... + class RenameEvent: old_path: Path new_path: Path + def __init__(self, old_path: str, new_path: str) -> None: ... + class WatcherWrapper: """ Watcher listens to filesystem events and retrieves them for the Notifier.