scripts: gen_kobject_list.py: Simplify test with 'in'
Getting slightly subjective, but fixes this pylint warning: scripts/gen_kobject_list.py:308:11: R1714: Consider merging these comparisons with "in" to "kobj in ('device', '_k_thread_stack_element')" (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
89efaeda74
commit
3feb8f96f6
1 changed files with 1 additions and 1 deletions
|
@ -305,7 +305,7 @@ def write_kobj_size_output(fp):
|
||||||
dep, _ = obj_info
|
dep, _ = obj_info
|
||||||
# device handled by default case. Stacks are not currently handled,
|
# device handled by default case. Stacks are not currently handled,
|
||||||
# if they eventually are it will be a special case.
|
# if they eventually are it will be a special case.
|
||||||
if kobj == "device" or kobj == "_k_thread_stack_element":
|
if kobj in {"device", "_k_thread_stack_element"}:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if dep:
|
if dep:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue