hwdb: add missing Group()
This fixes the following warning: ``` parse_hwdb.py:120: UserWarning: warn_ungrouped_named_tokens_in_collection: setting results name 'SETTINGS*' on And expression collides with 'HZ' on contained expression dpi_setting = (Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ'))('SETTINGS*') ``` Not sure about for the mount_matrix, but LGTM.com warns in that line, and, adding Group() does not change the parse result.
This commit is contained in:
parent
e77fed207a
commit
315a3c9ff4
|
@ -117,9 +117,9 @@ def hwdb_grammar():
|
|||
def property_grammar():
|
||||
ParserElement.setDefaultWhitespaceChars(' ')
|
||||
|
||||
dpi_setting = (Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ'))('SETTINGS*')
|
||||
dpi_setting = Group(Optional('*')('DEFAULT') + INTEGER('DPI') + Suppress('@') + INTEGER('HZ'))('SETTINGS*')
|
||||
mount_matrix_row = SIGNED_REAL + ',' + SIGNED_REAL + ',' + SIGNED_REAL
|
||||
mount_matrix = (mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX')
|
||||
mount_matrix = Group(mount_matrix_row + ';' + mount_matrix_row + ';' + mount_matrix_row)('MOUNT_MATRIX')
|
||||
xkb_setting = Optional(Word(alphanums + '+-/@._'))
|
||||
|
||||
props = (('MOUSE_DPI', Group(OneOrMore(dpi_setting))),
|
||||
|
|
Loading…
Reference in New Issue