Patchwork D1997: wireproto: improve docstring for @wireprotocommand

login
register
mail settings
Submitter phabricator
Date Feb. 1, 2018, 11:37 p.m.
Message ID <differential-rev-PHID-DREV-twwradrfia5f2ausxjb4-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27204/
State Superseded
Headers show

Comments

phabricator - Feb. 1, 2018, 11:37 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I'm about to add more arguments and want them to be documented.
  Plus, good documentation is nice to have.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D1997

AFFECTED FILES
  mercurial/wireproto.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/wireproto.py b/mercurial/wireproto.py
--- a/mercurial/wireproto.py
+++ b/mercurial/wireproto.py
@@ -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