-
Notifications
You must be signed in to change notification settings - Fork 202
Custom groups #1068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Custom groups #1068
Conversation
| from evdev.ecodes import EV_ABS, EV_KEY | ||
|
|
||
| from inputremapper.groups import groups, _Groups | ||
| from inputremapper.groups import groups, Groups |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Module "inputremapper.groups" has no attribute "groups"; maybe "Groups"? [attr-defined]
| def setUp(self) -> None: | ||
| self.message_broker = MessageBroker() | ||
| self.reader = ReaderClient(self.message_broker, _Groups()) | ||
| self.reader = ReaderClient(self.message_broker, Groups()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Missing positional argument "global_config" in call to "Groups" [call-arg]
| self.message_broker, | ||
| GlobalConfig(), | ||
| ReaderClient(self.message_broker, _Groups()), | ||
| ReaderClient(self.message_broker, Groups()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Missing positional argument "global_config" in call to "Groups" [call-arg]
| else: | ||
| result = self._group_all_into_one() | ||
|
|
||
| self.pipe.send(json.dumps([group.dumps() for group in result])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: multiprocessing.Pipe? has no attribute "send" [attr-defined]
|
|
||
| used_names.add(unique_name) | ||
|
|
||
| group = Group( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Incompatible types in assignment (expression has type "Group", variable has type "list[tuple[str, str, DeviceType]]") [assignment]
|
|
||
| group = Group( | ||
| key=unique_name, | ||
| paths=devs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Argument "paths" to "Group" has incompatible type "list[str]"; expected "list[PathLike[Any]]" [arg-type]
| capabilities = device.capabilities(absinfo=False) | ||
| result.append(group) | ||
|
|
||
| return result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Incompatible return value type (got "list[list[tuple[str, str, DeviceType]]]", expected "list[Group]") [return-value]
| self._groups: List[_Group] = None | ||
| def __init__(self, global_config: GlobalConfig): | ||
| self.global_config = global_config | ||
| self._groups: List[Group] = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[mypy] reported by reviewdog 🐶
error: Incompatible types in assignment (expression has type "None", variable has type "list[Group]") [assignment]
Help
Please install this if you know how (check the readme out at the bottom, uninstall input-remapper first) and see if anything bad happens. Provide feedback if something breaks.