diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-09-01 02:57:51 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-09-01 02:57:51 (GMT) |
commit | 29e9530300108c91ba446921bcdc95595a445245 (patch) | |
tree | 7f2a3a36201d9548ce6f62e742a467e07b7d8422 /src/engine/SCons/Variables | |
parent | 37dfc19d9bb694d80c1bc97d79e519a6d90bcaba (diff) | |
download | SCons-29e9530300108c91ba446921bcdc95595a445245.zip SCons-29e9530300108c91ba446921bcdc95595a445245.tar.gz SCons-29e9530300108c91ba446921bcdc95595a445245.tar.bz2 |
Fix many epydoc warnings
Diffstat (limited to 'src/engine/SCons/Variables')
-rw-r--r-- | src/engine/SCons/Variables/BoolVariable.py | 10 | ||||
-rw-r--r-- | src/engine/SCons/Variables/EnumVariable.py | 24 | ||||
-rw-r--r-- | src/engine/SCons/Variables/ListVariable.py | 12 | ||||
-rw-r--r-- | src/engine/SCons/Variables/PackageVariable.py | 24 | ||||
-rw-r--r-- | src/engine/SCons/Variables/PathVariable.py | 9 | ||||
-rw-r--r-- | src/engine/SCons/Variables/__init__.py | 21 |
6 files changed, 50 insertions, 50 deletions
diff --git a/src/engine/SCons/Variables/BoolVariable.py b/src/engine/SCons/Variables/BoolVariable.py index c005a62..ce46eda 100644 --- a/src/engine/SCons/Variables/BoolVariable.py +++ b/src/engine/SCons/Variables/BoolVariable.py @@ -2,12 +2,12 @@ This file defines the option type for SCons implementing true/false values. -Usage example: +Usage example:: - opts = Variables() - opts.Add(BoolVariable('embedded', 'build for an embedded system', 0)) - ... - if env['embedded'] == 1: + opts = Variables() + opts.Add(BoolVariable('embedded', 'build for an embedded system', 0)) + ... + if env['embedded'] == 1: ... """ diff --git a/src/engine/SCons/Variables/EnumVariable.py b/src/engine/SCons/Variables/EnumVariable.py index 9448ba9..a9fb100 100644 --- a/src/engine/SCons/Variables/EnumVariable.py +++ b/src/engine/SCons/Variables/EnumVariable.py @@ -3,14 +3,14 @@ This file defines the option type for SCons allowing only specified input-values. -Usage example: +Usage example:: - opts = Variables() - opts.Add(EnumVariable('debug', 'debug output and symbols', 'no', + opts = Variables() + opts.Add(EnumVariable('debug', 'debug output and symbols', 'no', allowed_values=('yes', 'no', 'full'), map={}, ignorecase=2)) - ... - if env['debug'] == 'full': + ... + if env['debug'] == 'full': ... """ @@ -69,16 +69,14 @@ def EnumVariable(key, help, default, allowed_values, map={}, ignorecase=0): 'ignorecase' defines the behaviour of the validator: - If ignorecase == 0, the validator/converter are case-sensitive. - If ignorecase == 1, the validator/converter are case-insensitive. - If ignorecase == 2, the validator/converter is case-insensitive and - the converted value will always be lower-case. + If ignorecase == 0, the validator/converter are case-sensitive. + If ignorecase == 1, the validator/converter are case-insensitive. + If ignorecase == 2, the validator/converter is case-insensitive and the converted value will always be lower-case. - The 'validator' tests whether the value is in the list of allowed - values. The 'converter' converts input values according to the - given 'map'-dictionary (unmapped input values are returned - unchanged). + The 'validator' tests whether the value is in the list of allowed values. The 'converter' converts input values + according to the given 'map'-dictionary (unmapped input values are returned unchanged). """ + help = '%s (%s)' % (help, '|'.join(allowed_values)) # define validator if ignorecase >= 1: diff --git a/src/engine/SCons/Variables/ListVariable.py b/src/engine/SCons/Variables/ListVariable.py index f2fdc18..9024867 100644 --- a/src/engine/SCons/Variables/ListVariable.py +++ b/src/engine/SCons/Variables/ListVariable.py @@ -7,17 +7,17 @@ separated by comma. After the option has been processed, the option value holds either the named list elements, all list elements or no list elements at all. -Usage example: +Usage example:: - list_of_libs = Split('x11 gl qt ical') + list_of_libs = Split('x11 gl qt ical') - opts = Variables() - opts.Add(ListVariable('shared', + opts = Variables() + opts.Add(ListVariable('shared', 'libraries to build as shared libraries', 'all', elems = list_of_libs)) - ... - for lib in list_of_libs: + ... + for lib in list_of_libs: if lib in env['shared']: env.SharedObject(...) else: diff --git a/src/engine/SCons/Variables/PackageVariable.py b/src/engine/SCons/Variables/PackageVariable.py index 4ab0856..a0ace25 100644 --- a/src/engine/SCons/Variables/PackageVariable.py +++ b/src/engine/SCons/Variables/PackageVariable.py @@ -13,18 +13,18 @@ Usage example: x11=yes (will search for the package installation dir) x11=/usr/local/X11 (will check this path for existence) - To replace autoconf's --with-xxx=yyy - - opts = Variables() - opts.Add(PackageVariable('x11', - 'use X11 installed here (yes = search some places', - 'yes')) - ... - if env['x11'] == True: - dir = ... search X11 in some standard places ... - env['x11'] = dir - if env['x11']: - ... build with x11 ... + To replace autoconf's --with-xxx=yyy :: + + opts = Variables() + opts.Add(PackageVariable('x11', + 'use X11 installed here (yes = search some places', + 'yes')) + ... + if env['x11'] == True: + dir = ... search X11 in some standard places ... + env['x11'] = dir + if env['x11']: + ... build with x11 ... """ # diff --git a/src/engine/SCons/Variables/PathVariable.py b/src/engine/SCons/Variables/PathVariable.py index e615a53..0ffcbc5 100644 --- a/src/engine/SCons/Variables/PathVariable.py +++ b/src/engine/SCons/Variables/PathVariable.py @@ -8,8 +8,7 @@ Arguments to PathVariable are: option-name = name of this option on the command line (e.g. "prefix") option-help = help string for option option-dflt = default value for this option - validator = [optional] validator for option value. Predefined - validators are: + validator = [optional] validator for option value. Predefined validators are: PathAccept -- accepts any path setting; no validation PathIsDir -- path must be an existing directory @@ -25,7 +24,7 @@ Arguments to PathVariable are: and the env is the env to which the Options have been added. -Usage example: +Usage example:: Examples: prefix=/usr/local @@ -34,8 +33,8 @@ Usage example: opts = Variables() opts.Add(PathVariable('qtdir', - 'where the root of Qt is installed', - qtdir, PathIsDir)) + 'where the root of Qt is installed', + qtdir, PathIsDir)) opts.Add(PathVariable('qt_includes', 'where the Qt includes are installed', '$qtdir/includes', PathIsDirCreate)) diff --git a/src/engine/SCons/Variables/__init__.py b/src/engine/SCons/Variables/__init__.py index 1fe4435..5b20b30 100644 --- a/src/engine/SCons/Variables/__init__.py +++ b/src/engine/SCons/Variables/__init__.py @@ -115,13 +115,13 @@ class Variables(object): """ Add an option. - key - the name of the variable, or a list or tuple of arguments - help - optional help text for the options - default - optional default value - validator - optional function that is called to validate the option's value - Called with (key, value, environment) - converter - optional function that is called to convert the option's value before - putting it in the environment. + + @param key: the name of the variable, or a list or tuple of arguments + @param help: optional help text for the options + @param default: optional default value + @param validator: optional function that is called to validate the option's value + @type validator: Called with (key, value, environment) + @param converter: optional function that is called to convert the option's value before putting it in the environment. """ if SCons.Util.is_List(key) or isinstance(key, tuple): @@ -141,14 +141,17 @@ class Variables(object): Each list element is a tuple/list of arguments to be passed on to the underlying method for adding options. - Example: - opt.AddVariables( + Example:: + + opt.AddVariables( ('debug', '', 0), ('CC', 'The C compiler'), ('VALIDATE', 'An option for testing validation', 'notset', validator, None), ) + """ + for o in optlist: self._do_add(*o) |