Skip to content

Commit 7ea6667

Browse files
committed
More sphinx build tweaks [ci skip]
Signed-off-by: Mats Wichmann <[email protected]>
1 parent ff57c32 commit 7ea6667

File tree

4 files changed

+51
-35
lines changed

4 files changed

+51
-35
lines changed

SCons/Environment.py

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1500,13 +1500,18 @@ def Detect(self, progs):
15001500

15011501

15021502
def Dictionary(self, *args):
1503-
r"""Return construction variables from an environment.
1503+
"""Return construction variables from an environment.
15041504
1505-
:param args: (optional) variable names to look up
1506-
:returns: if args omitted, the dictionary of all constr. vars.
1507-
If one arg, the corresponding value is returned.
1508-
If more than one arg, a list of values is returned.
1509-
:raises KeyError: if any of args is not in the construction env.
1505+
Args:
1506+
args: (optional) variable names to look up
1507+
1508+
Returns:
1509+
if args omitted, the dictionary of all consvars.
1510+
If one arg, the corresponding value is returned.
1511+
If more than one arg, a list of values is returned.
1512+
1513+
Raises:
1514+
KeyError: if any of args is not in the construction env.
15101515
15111516
"""
15121517
if not args:
@@ -1520,12 +1525,13 @@ def Dictionary(self, *args):
15201525
def Dump(self, key=None, format='pretty'):
15211526
""" Serialize the construction variables to a string.
15221527
1523-
:param key: if None, format the whole dict of variables.
1524-
Else look up and format just the value for key.
1525-
1526-
:param format: specify the format of the variables to be serialized:
1528+
Args:
1529+
key: if None, format the whole dict of variables.
1530+
Else format just the value for key (Default value = None)
1531+
format: specify the format of the variables to be serialized:
15271532
- pretty: pretty-printed string.
15281533
- json: JSON-formatted string.
1534+
(Default value = None)
15291535
15301536
"""
15311537
if key:
@@ -1556,12 +1562,15 @@ def non_serializable(obj):
15561562

15571563

15581564
def FindIxes(self, paths, prefix, suffix):
1559-
"""
1560-
Search a list of paths for something that matches the prefix and suffix.
1565+
"""Search a list of paths for something that matches the prefix and suffix.
1566+
1567+
Args:
1568+
paths: the list of paths or nodes.
1569+
prefix: construction variable for the prefix.
1570+
suffix: construction variable for the suffix.
1571+
1572+
Returns: the matched path or None
15611573
1562-
paths - the list of paths or nodes.
1563-
prefix - construction variable for the prefix.
1564-
suffix - construction variable for the suffix.
15651574
"""
15661575

15671576
suffix = self.subst('$'+suffix)

SCons/Script/SConsOptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def reparse_local_options(self):
345345
346346
Else, this would lead to problems in add_local_option()
347347
below. When called from there, we try to reparse the
348-
command-line arguments that:
348+
command-line arguments that
349349
350350
1. haven't been processed so far (self.largs), but
351351
2. are possibly not added to the list of options yet.

SCons/Variables/__init__.py

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,22 @@ class Variables:
4949
Holds all the options, updates the environment with the variables,
5050
and renders the help text.
5151
"""
52-
instance=None
52+
instance = None
5353

54-
def __init__(self, files=None, args=None, is_global=1):
55-
"""
56-
files - [optional] List of option configuration files to load
57-
(backward compatibility) If a single string is passed it is
58-
automatically placed in a file list
59-
args - dictionary to override values set from files.
60-
"""
54+
def __init__(self, files=None, args=None, is_global=True):
55+
"""Create Variables instance.
56+
57+
If is_global is True, this is a singleton, create only once.
58+
59+
Args:
60+
files: [optional] List of option configuration files to load
61+
(backward compatibility). If a single string is passed it is
62+
automatically placed in a file list (Default value = None)
63+
args - dictionary to override values set from files.
64+
(Default value = None)
65+
is_global - global instance? (Default value = True)
6166
67+
"""
6268
if args is None:
6369
args = {}
6470
self.options = []
@@ -112,18 +118,19 @@ def keys(self):
112118
return [o.key for o in self.options]
113119

114120
def Add(self, key, help="", default=None, validator=None, converter=None, **kw):
115-
"""
116-
Add an option.
121+
"""Add an option.
122+
123+
Args:
124+
key: the name of the variable, or a list or tuple of arguments
125+
help: optional help text for the options (Default value = "")
126+
default: optional default value for option (Default value = None)
127+
validator: optional function called to validate the option's value
128+
(Default value = None)
129+
converter: optional function to be called to convert the option's
130+
value before putting it in the environment. (Default value = None)
131+
kw: keyword args, unused.
117132
118-
119-
@param key: the name of the variable, or a list or tuple of arguments
120-
@param help: optional help text for the options
121-
@param default: optional default value
122-
@param validator: optional function that is called to validate the option's value
123-
@type validator: Called with (key, value, environment)
124-
@param converter: optional function that is called to convert the option's value before putting it in the environment.
125133
"""
126-
127134
if SCons.Util.is_List(key) or isinstance(key, tuple):
128135
self._do_add(*key)
129136
return

doc/sphinx/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#
2020
import os
2121
import sys
22-
sys.path.insert(0, os.path.abspath('../../src/engine/'))
22+
sys.path.insert(0, os.path.abspath('../../'))
2323

2424
# -- General configuration ------------------------------------------------
2525

0 commit comments

Comments
 (0)