Stringify type hint to avoid circular import
Reproducers:
python3 -c 'from qutebrowser.extensions import loader'
python3 -c 'import qutebrowser.commands.command'
Specifically the first on was being called from misc/qutebrowser.spec in
the nightly installer build jobs.
Running the full application still works fine somehow. So it might be
possible to import things in the right order to avoid the loop. But
since this is part of our API we probably don't want to require too much
juggling.
This commit is contained in:
parent
fc843f3944
commit
1dba77ddb3
|
|
@ -101,7 +101,7 @@ class _CmdHandlerType(Protocol):
|
|||
Below, we cast the decorated function to _CmdHandlerType to make mypy aware of this.
|
||||
"""
|
||||
|
||||
qute_args: Optional[Dict[str, command.ArgInfo]]
|
||||
qute_args: Optional[Dict[str, 'command.ArgInfo']]
|
||||
|
||||
def __call__(self, *args: Any, **kwargs: Any) -> Any:
|
||||
...
|
||||
|
|
|
|||
Loading…
Reference in New Issue