diff options
author | Philip Paquette <pcpaquette@gmail.com> | 2019-09-11 12:58:45 -0400 |
---|---|---|
committer | Philip Paquette <pcpaquette@gmail.com> | 2019-09-14 18:18:53 -0400 |
commit | abb42dcd4886705d6ba8af27f68ef605218ac67c (patch) | |
tree | 9ae16f7a09fff539fa72e65198e284bca6ac3376 /diplomacy/daide/connection_handler.py | |
parent | a954a00d263750c279dbb2c0a9ae85707022bcd7 (diff) |
Added ReadtheDocs documentation for the public API
- Reformatted the docstring to be compatible
- Added tests to make sure the documentation compiles properly
- Added sphinx as a pip requirement
Co-authored-by: Philip Paquette <pcpaquette@gmail.com>
Co-authored-by: notoraptor <stevenbocco@gmail.com>
Diffstat (limited to 'diplomacy/daide/connection_handler.py')
-rw-r--r-- | diplomacy/daide/connection_handler.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/diplomacy/daide/connection_handler.py b/diplomacy/daide/connection_handler.py index 0b606bf..ab8d6cd 100644 --- a/diplomacy/daide/connection_handler.py +++ b/diplomacy/daide/connection_handler.py @@ -29,9 +29,12 @@ from diplomacy.utils import exceptions # Constants LOGGER = logging.getLogger(__name__) -class ConnectionHandler(): - """ ConnectionHandler class. Properties: - - server: server object representing running server. +class ConnectionHandler: + """ ConnectionHandler class. + + Properties: + + - **server**: server object representing running server. """ _NAME_VARIANT_PREFIX = 'DAIDE' _NAME_VARIANTS_POOL = [] @@ -54,6 +57,7 @@ class ConnectionHandler(): def initialize(self, stream, server, game_id): """ Initialize the connection handler. + :param server: a Server object. :type server: diplomacy.Server """ @@ -152,6 +156,7 @@ class ConnectionHandler(): def translate_notification(self, notification): """ Translate a notification to a DAIDE notification. + :param notification: a notification object to pass to handler function. See diplomacy.communication.notifications for possible notifications. :return: either None or an array of daide notifications. |