zephyr/scripts/kconfig
Ulf Magnusson a449c98db2 scripts: Fix risky uses of non-raw regex strings in Python scripts
Fixes pylint warnings like this one:

    doc/conf.py:325:0: W1401: Anomalous backslash in string: '\s'.
    String constant might be missing an r prefix.
    (anomalous-backslash-in-string)

The reason for this warning is that backslash escapes are interpreted in
non-raw (non-r-prefixed) strings. For example, '\a' and r'\a' are not
the same string (first one has a single ASCII bell character, second one
has two characters).

It just happens that there's no \s (or \., or \/) escape for example,
and '\s' turns into two characters (as needed for a regex). It's risky
to rely on stuff like that regexes though. Best to make them raw strings
unless they're super trivial.

Also note that '\s' and '\\s' turn into the same string.

Another tip: A literal ' can be put into a string with "blah'blah"
instead of 'blah\'blah'.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-03-28 14:41:32 -05:00
..
checkconfig.py scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
diffconfig scripts: move kconfig related scripts to scripts/kconfig 2017-09-11 08:53:56 -07:00
kconfig.py kconfig: Have ninja Re-run CMake when Kconfig sources change 2019-03-07 10:40:00 +01:00
kconfigfunctions.py scripts: Remove unnecessary () around if/while conditions in Python 2019-03-26 07:59:59 -05:00
kconfiglib.py kconfiglib: Give more helpful hints for missing files 2019-03-06 12:07:50 +01:00
menuconfig.py kconfiglib: Clarify kconfig_filenames doc re. absolute paths 2019-02-20 11:22:17 -06:00