From abb42dcd4886705d6ba8af27f68ef605218ac67c Mon Sep 17 00:00:00 2001 From: Philip Paquette Date: Wed, 11 Sep 2019 12:58:45 -0400 Subject: 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 Co-authored-by: notoraptor --- diplomacy/utils/strings.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'diplomacy/utils/strings.py') diff --git a/diplomacy/utils/strings.py b/diplomacy/utils/strings.py index 65efb64..80b83a3 100644 --- a/diplomacy/utils/strings.py +++ b/diplomacy/utils/strings.py @@ -63,6 +63,7 @@ DUMMY = 'dummy' DUMMY_PLAYER = 'dummy_player' DUMMY_POWERS = 'dummy_powers' ERROR = 'error' +ERROR_TYPE = 'error_type' FOR_OMNISCIENCE = 'for_omniscience' FORCED = 'forced' FORCED_ORDERS = 'forced_orders' @@ -235,8 +236,9 @@ def role_is_special(role): def switch_special_role(role): """ Return opposite special role of given special role: - - observer role if omniscient role is given - - omniscient role if observer role is given + + - observer role if omniscient role is given + - omniscient role if observer role is given """ if role == OBSERVER_TYPE: return OMNISCIENT_TYPE -- cgit v1.2.3