Skip to content

Commit

Permalink
[fix] utils.categorize return type
Browse files Browse the repository at this point in the history
  • Loading branch information
bastian-wattro committed Feb 27, 2025
1 parent 82d09f6 commit 3ca5a15
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/evdev/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from typing import Union, List

from . import ecodes
from .events import InputEvent, event_factory
from .events import InputEvent, event_factory, KeyEvent, RelEvent, AbsEvent, SynEvent


def list_devices(input_device_dir: Union[str, bytes, os.PathLike] = "/dev/input") -> List[str]:
Expand All @@ -32,7 +32,7 @@ def is_device(fn: Union[str, bytes, os.PathLike]) -> bool:
return True


def categorize(event: InputEvent) -> InputEvent:
def categorize(event: InputEvent) -> Union[InputEvent, KeyEvent, RelEvent, AbsEvent, SynEvent]:
"""
Categorize an event according to its type.
Expand Down

0 comments on commit 3ca5a15

Please sign in to comment.