From 880d56fe6ef3d211120a56ab95908f824606c80e Mon Sep 17 00:00:00 2001 From: Moosems <95927277+Moosems@users.noreply.github.com> Date: Sun, 28 Jul 2024 19:42:35 -0600 Subject: [PATCH] Formatting --- collegamento/__init__.py | 1 - collegamento/files_variant.py | 8 +++++--- docs/source/examples/simple_example.rst | 1 + examples/simple_example.py | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/collegamento/__init__.py b/collegamento/__init__.py index cb44f5a..feb88cd 100644 --- a/collegamento/__init__.py +++ b/collegamento/__init__.py @@ -8,7 +8,6 @@ FileRequest, FileServer, ) - from .simple_client_server import ( # noqa: F401, E402 USER_FUNCTION, Notification, diff --git a/collegamento/files_variant.py b/collegamento/files_variant.py index 1921eed..809f3a9 100644 --- a/collegamento/files_variant.py +++ b/collegamento/files_variant.py @@ -4,9 +4,9 @@ from .simple_client_server import ( USER_FUNCTION, - SimpleClient, Notification, Request, + SimpleClient, SimpleServer, ) @@ -24,9 +24,10 @@ class FileNotification(Notification): class FileClient(SimpleClient): """File handling variant of SImpleClient. Extra methods: - - FileClient.update_file() - - FileClient.remove_file() + - FileClient.update_file() + - FileClient.remove_file() """ + def __init__( self, commands: dict[str, USER_FUNCTION], id_max: int = 15_000 ) -> None: @@ -88,6 +89,7 @@ def remove_file(self, file: str) -> None: class FileServer(SimpleServer): """File handling variant of SimpleServer""" + def __init__( self, commands: dict[str, USER_FUNCTION], diff --git a/docs/source/examples/simple_example.rst b/docs/source/examples/simple_example.rst index 08f6ad9..7226e75 100644 --- a/docs/source/examples/simple_example.rst +++ b/docs/source/examples/simple_example.rst @@ -31,6 +31,7 @@ Simple Example context.kill_IPC() + if __name__ == "__main__": main() diff --git a/examples/simple_example.py b/examples/simple_example.py index 98fd1e8..ae9c585 100644 --- a/examples/simple_example.py +++ b/examples/simple_example.py @@ -25,5 +25,6 @@ def main(): context.kill_IPC() + if __name__ == "__main__": main()