west: zcmake.py: Simplify test with 'in'
Getting slightly subjective, but fixes this pylint warning: scripts/west_commands/zcmake.py:186:13: R1714: Consider merging these comparisons with "in" to "type_ in ('STRING', 'INTERNAL')" (consider-using-in) Use a set literal instead of a tuple literal, as recent Python 3 versions optimize set literals with constant keys nicely. Getting rid of pylint warnings for a CI check. I could disable any controversial ones (it's already a list of warnings to enable anyway). Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
parent
f5d8ece3b7
commit
16041cda0c
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ class CMakeCacheEntry:
|
|||
except ValueError as exc:
|
||||
args = exc.args + ('on line {}: {}'.format(line_no, line),)
|
||||
raise ValueError(args) from exc
|
||||
elif type_ == 'STRING' or type_ == 'INTERNAL':
|
||||
elif type_ in {'STRING', 'INTERNAL'}:
|
||||
# If the value is a CMake list (i.e. is a string which
|
||||
# contains a ';'), convert to a Python list.
|
||||
if ';' in value:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue