diff --git a/posix_ipc.pyi b/posix_ipc.pyi new file mode 100644 index 0000000..433e210 --- /dev/null +++ b/posix_ipc.pyi @@ -0,0 +1,19 @@ +from collections.abc import Callable +from typing import Any + +class MessageQueue: + def __init__( + self, + name: str | None, + flags: int = ..., + mode: int = ..., + max_messages: int = ..., + max_message_size: int = ..., + read: bool = ..., + write: bool = ..., + ) -> None: ... + def send(self, message: str | bytes, timeout: float | None = ..., priority: int = ...) -> None: ... + def receive(self, timeout: float | None = ...) -> bytes: ... + def request_notification(self, notification: int | tuple[Callable[[Any], None], Any] | None = ...) -> None: ... + def close(self) -> None: ... + def unlink(self) -> None: ... diff --git a/py.typed b/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py index c1a6826..7286d50 100644 --- a/setup.py +++ b/setup.py @@ -71,5 +71,6 @@ classifiers=classifiers, license=license, keywords=keywords, - ext_modules=ext_modules + ext_modules=ext_modules, + package_data={"posix_ipc": ["*.pyi", "py.typed"]} )