Skip to content

Commit

Permalink
Merge usage-docstring-formatting-7329
Browse files Browse the repository at this point in the history
Fixes: twisted#7329
Author: fbrennen
Reviewer: exarkun

Fix invalid epytext markup around the API documentation examples for
`twisted.python.usage.Options`.


git-svn-id: svn://svn.twistedmatrix.com/svn/Twisted/trunk@43485 bbbe8e31-12d6-0310-92fd-ac37d47ddeeb
  • Loading branch information
exarkun committed Nov 16, 2014
1 parent e2c12cf commit 6d1c0cc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions twisted/python/usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ class Options(dict):
optFlags is assigned a list of lists. Each list represents
a flag parameter, as so::
| optFlags = [['verbose', 'v', 'Makes it tell you what it doing.'],
| ['quiet', 'q', 'Be vewy vewy quiet.']]
optFlags = [['verbose', 'v', 'Makes it tell you what it doing.'],
['quiet', 'q', 'Be vewy vewy quiet.']]
As you can see, the first item is the long option name
(prefixed with '--' on the command line), followed by the
Expand All @@ -88,7 +88,7 @@ class Options(dict):
C{optParameters} is much the same, except the list also contains
a default value::
| optParameters = [['outfile', 'O', 'outfile.log', 'Description...']]
optParameters = [['outfile', 'O', 'outfile.log', 'Description...']]
A coerce function can also be specified as the last element: it will be
called with the argument and should return the value that will be stored
Expand All @@ -101,12 +101,12 @@ class Options(dict):
instantiated and given the remainder of the arguments to parse and
self.opts[command] is set to the command name. For example::
| subCommands = [
| ['inquisition', 'inquest', InquisitionOptions,
| 'Perform an inquisition'],
| ['holyquest', 'quest', HolyQuestOptions,
| 'Embark upon a holy quest']
| ]
subCommands = [
['inquisition', 'inquest', InquisitionOptions,
'Perform an inquisition'],
['holyquest', 'quest', HolyQuestOptions,
'Embark upon a holy quest']
]
In this case, C{"<program> holyquest --horseback --for-grail"} will cause
C{HolyQuestOptions} to be instantiated and asked to parse
Expand All @@ -116,9 +116,9 @@ class Options(dict):
subOptions attribute is set to the Option instance that parses the
remaining options. If a subcommand is not given to parseOptions,
the subCommand attribute will be None. You can also mark one of
the subCommands to be the default.
the subCommands to be the default::
| defaultSubCommand = 'holyquest'
defaultSubCommand = 'holyquest'
In this case, the subCommand attribute will never be None, and
the subOptions attribute will always be set.
Expand Down
Empty file added twisted/topfiles/7329.misc
Empty file.

0 comments on commit 6d1c0cc

Please sign in to comment.