changeset 35980:b4976912a6ef

wireproto: improve docstring for @wireprotocommand I'm about to add more arguments and want them to be documented. Plus, good documentation is nice to have. Differential Revision: https://phab.mercurial-scm.org/D1997
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 30 Jan 2018 15:21:59 -0800
parents ae79cf6f9c82
children ef683a0fd21f
files mercurial/wireproto.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Wed Jan 31 10:06:39 2018 -0800
+++ b/mercurial/wireproto.py	Tue Jan 30 15:21:59 2018 -0800
@@ -638,7 +638,13 @@
 commands = {}
 
 def wireprotocommand(name, args=''):
-    """decorator for wire protocol command"""
+    """Decorator to declare a wire protocol command.
+
+    ``name`` is the name of the wire protocol command being provided.
+
+    ``args`` is a space-delimited list of named arguments that the command
+    accepts. ``*`` is a special value that says to accept all arguments.
+    """
     def register(func):
         commands[name] = (func, args)
         return func