Skip to content

Commit

Permalink
#31 added typing for event constructors (#33)
Browse files Browse the repository at this point in the history
* #31 added typing for event constructors

* #31 Made path typing actual

* #31 linting
  • Loading branch information
roma-glushko authored Jan 2, 2024
1 parent fdbc343 commit 33f21a8
Showing 1 changed file with 25 additions and 10 deletions.
35 changes: 25 additions & 10 deletions notifykit/_notifykit_lib.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from enum import IntEnum
from pathlib import Path
from typing import List, Optional, Any

"""
Expand Down Expand Up @@ -48,35 +47,51 @@ class MetadataType(IntEnum):
OTHER = 6

class AccessEvent:
path: Path
path: str
access_type: AccessType
access_mode: Optional[AccessMode]

def __init__(self, path: str, access_type: AccessType, access_mode: Optional[AccessMode]) -> None: ...

class CreateEvent:
path: Path
path: str
file_type: ObjectType

def __init__(self, path: str, file_type: ObjectType) -> None: ...

class ModifyDataEvent:
path: Path
path: str
data_type: DataType

def __init__(self, path: str, data_type: DataType) -> None: ...

class ModifyMetadataEvent:
path: Path
path: str
metadata_type: MetadataType

def __init__(self, path: str, metadata_type: MetadataType) -> None: ...

class ModifyOtherEvent:
path: Path
path: str

def __init__(self, path: str) -> None: ...

class ModifyUnknownEvent:
path: Path
path: str

def __init__(self, path: str) -> None: ...

class DeleteEvent:
path: Path
path: str
file_type: ObjectType

def __init__(self, path: str, file_type: ObjectType) -> None: ...

class RenameEvent:
old_path: Path
new_path: Path
old_path: str
new_path: str

def __init__(self, old_path: str, new_path: str) -> None: ...

class WatcherWrapper:
"""
Expand Down

0 comments on commit 33f21a8

Please sign in to comment.