projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fd2e15
)
intel/genxml: use `a not in {x, y}` instead of `a != x or a != y`
author
Dylan Baker
<dylan.c.baker@intel.com>
Fri, 30 Sep 2022 18:29:30 +0000
(11:29 -0700)
committer
Dylan Baker
<dylan.c.baker@intel.com>
Sat, 1 Oct 2022 21:03:49 +0000
(14:03 -0700)
It's faster, less code, and more idiomatic
Reviewd-by: Jordan Justen <jordan.l.justen@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18917>
src/intel/genxml/gen_sort_tags.py
patch
|
blob
|
history
diff --git
a/src/intel/genxml/gen_sort_tags.py
b/src/intel/genxml/gen_sort_tags.py
index
5473dfa
..
05ff67a
100755
(executable)
--- a/
src/intel/genxml/gen_sort_tags.py
+++ b/
src/intel/genxml/gen_sort_tags.py
@@
-45,7
+45,7
@@
def add_struct_refs(items: typing.OrderedDict[str, bool], node: et.Element) -> N
t = node.attrib['type']
items[t] = True
return
- if node.tag
!= 'struct' and node.tag != 'group'
:
+ if node.tag
not in {'struct', 'group'}
:
return
for c in node:
add_struct_refs(items, c)