Avoid potential circular import in config.py.
There was a circular import from config -> keyconf -> miscmodels -> config. This is resolved by scoping config's keyconf import to the one function that uses it.
This commit is contained in:
parent
08bb3f4f19
commit
b36cf0572d
@ -38,7 +38,6 @@ from PyQt5.QtCore import pyqtSignal, QObject, QUrl, QSettings
|
||||
from PyQt5.QtGui import QColor
|
||||
|
||||
from qutebrowser.config import configdata, configexc, textwrapper
|
||||
from qutebrowser.config.parsers import keyconf
|
||||
from qutebrowser.config.parsers import ini
|
||||
from qutebrowser.commands import cmdexc, cmdutils
|
||||
from qutebrowser.utils import (message, objreg, utils, standarddir, log,
|
||||
@ -181,6 +180,7 @@ def _init_key_config(parent):
|
||||
Args:
|
||||
parent: The parent to use for the KeyConfigParser.
|
||||
"""
|
||||
from qutebrowser.config.parsers import keyconf
|
||||
args = objreg.get('args')
|
||||
try:
|
||||
key_config = keyconf.KeyConfigParser(standarddir.config(), 'keys.conf',
|
||||
|
Loading…
Reference in New Issue
Block a user