diff options
author | toofar <toofar@spalge.com> | 2023-08-12 14:34:47 +1200 |
---|---|---|
committer | toofar <toofar@spalge.com> | 2023-08-12 17:20:40 +1200 |
commit | 1dba77ddb31fc0b861cffacc64beb04666e273ac (patch) | |
tree | 07a7c8776b6be6046e2a49b5a2627743c9606043 | |
parent | fc843f39440e10f918d57b86c7043658a48d7366 (diff) | |
download | qutebrowser-1dba77ddb31fc0b861cffacc64beb04666e273ac.tar.gz qutebrowser-1dba77ddb31fc0b861cffacc64beb04666e273ac.zip |
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.
-rw-r--r-- | qutebrowser/api/cmdutils.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qutebrowser/api/cmdutils.py b/qutebrowser/api/cmdutils.py index 0c367c6bf..e5466f072 100644 --- a/qutebrowser/api/cmdutils.py +++ b/qutebrowser/api/cmdutils.py @@ -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: ... |