aboutsummaryrefslogtreecommitdiff
path: root/diplomacy/daide/utils.py
diff options
context:
space:
mode:
authorPhilip Paquette <pcpaquette@gmail.com>2019-09-11 12:58:45 -0400
committerPhilip Paquette <pcpaquette@gmail.com>2019-09-14 18:18:53 -0400
commitabb42dcd4886705d6ba8af27f68ef605218ac67c (patch)
tree9ae16f7a09fff539fa72e65198e284bca6ac3376 /diplomacy/daide/utils.py
parenta954a00d263750c279dbb2c0a9ae85707022bcd7 (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/utils.py')
-rw-r--r--diplomacy/daide/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/diplomacy/daide/utils.py b/diplomacy/daide/utils.py
index e300071..8e6072f 100644
--- a/diplomacy/daide/utils.py
+++ b/diplomacy/daide/utils.py
@@ -22,6 +22,7 @@ ClientConnection = namedtuple('ClientConnection', ['username', 'daide_user', 'to
def get_user_connection(server_users, game, connection_handler):
""" Get the DAIDE user connection informations
+
:param server_users: The instance of `diplomacy.server.users` of the game's server
:param game: The game the user has joined
:param connection_handler: The connection_handler of the user
@@ -38,6 +39,7 @@ def get_user_connection(server_users, game, connection_handler):
def str_to_bytes(daide_str):
""" Converts a str into its bytes representation
+
:param daide_str: A DAIDE string with tokens separated by spaces
:return: The bytes representation of the string
@@ -56,6 +58,7 @@ def str_to_bytes(daide_str):
def bytes_to_str(daide_bytes):
""" Converts a bytes into its str representation
+
:param daide_bytes: A DAIDE bytes with tokens separated by spaces
:return: The bytes representation of the string