zephyr/scripts
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
..
checkpatch
ci scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
coccinelle
cross_compiler
dts scripts/dts: Fix bug in dead /memreserve/ code 2019-03-28 11:11:13 -05:00
footprint
gitlint scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
kconfig scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
sanity_chk scripts: Remove unused imports in all Python scripts 2019-03-28 11:06:20 -05:00
support scripts: Remove unused imports in all Python scripts 2019-03-28 11:06:20 -05:00
west_commands scripts: Remove unused imports in all Python scripts 2019-03-28 11:06:20 -05:00
.gitignore
check_link_map.py scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
checkpatch.pl
checkstack.pl
coccicheck
dir_is_writeable.py
elf_helper.py scripts: elf_helper: Remove undefined var ref. in ArrayType.__repr__() 2019-03-28 11:07:42 -05:00
file2hex.py
filter-known-issues.py scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
gen_app_partitions.py scripts: Fix risky uses of non-raw regex strings in Python scripts 2019-03-28 14:41:32 -05:00
gen_cfb_font_header.py
gen_gcov_files.py
gen_kobject_list.py
gen_offset_header.py
gen_priv_stacks.py scripts: Remove unused variables in all Python scripts 2019-03-28 11:06:20 -05:00
gen_relocate_app.py scripts: Remove unused variables in all Python scripts 2019-03-28 11:06:20 -05:00
gen_syscall_header.py
gen_syscalls.py
mergehex.py scripts: Remove unused variables in all Python scripts 2019-03-28 11:06:20 -05:00
parse_syscalls.py
process_gperf.py
qemu-machine-hack.py
requirements.txt
sanitycheck
series-push-hook.sh
spelling.txt
subfolder_list.py
tags.sh
valgrind.supp
waitpid
west-commands.yml
yaml_to_cmake.py scripts: Remove unused imports in all Python scripts 2019-03-28 11:06:20 -05:00