Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Now that we have real types for setfont, I tried to lift there in a test. It didn't work, because we didn't explicitly import 'Union' into the type lifter function's namespace, so we ended up with: 2024-04-27 16:31:01,582 libqtile loop.py:_handle_exception():L62 Exception in event loop: Traceback (most recent call last): File "/home/tycho/packages/qtile/libqtile/ipc.py", line 235, in _server_callback rep = self.handler(req) File "/home/tycho/packages/qtile/libqtile/command/interface.py", line 424, in call args, kwargs = lift_args(cmd, args, kwargs) File "/home/tycho/packages/qtile/libqtile/command/interface.py", line 367, in lift_args params = typing.get_type_hints(cmd, globalns=globals()) File "/usr/lib/python3.10/typing.py", line 1871, in get_type_hints value = _eval_type(value, globalns, localns) File "/usr/lib/python3.10/typing.py", line 327, in _eval_type return t._evaluate(globalns, localns, recursive_guard) File "/usr/lib/python3.10/typing.py", line 694, in _evaluate eval(self.__forward_code__, globalns, localns), File "<string>", line 1, in <module> NameError: name 'Union' is not defined this is the unfortunate reality that I described in the original lifting commit: we need to have all these types aligned and available in the local namespace in order to make this work. So, let's make this true for Union. Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
- Loading branch information