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:
toofar 2023-08-12 14:34:47 +12:00
parent fc843f3944
commit 1dba77ddb3
1 changed files with 1 additions and 1 deletions

View File

@ -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:
...