mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
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:
@@ -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))),
|
||||
|
||||
Reference in New Issue
Block a user