Skip to content

Commit

Permalink
fix utils.categorize return type (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
bastian-wattro authored Feb 28, 2025
1 parent 82d09f6 commit 5f9fd2c
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 5f9fd2c

Please sign in to comment.