mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-02-13 17:30:34 +01:00
scanner: add a validator for Interface.mode
Not really needed since we currently have an assert in create but this makes the code more obvious.
This commit is contained in:
parent
3546a443a9
commit
f15736e809
1 changed files with 1 additions and 1 deletions
|
|
@ -305,7 +305,7 @@ class Interface:
|
|||
events: List[Event] = attr.ib(init=False, factory=list)
|
||||
enums: List[Enum] = attr.ib(init=False, factory=list)
|
||||
|
||||
mode: str = attr.ib() # "ei" or "eis"
|
||||
mode: str = attr.ib(validator=attr.validators.in_(["ei", "eis", "brei"]))
|
||||
description: Optional[Description] = attr.ib(default=None)
|
||||
|
||||
@property
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue