コード例 #1
0
ファイル: config.py プロジェクト: zaowen/qutebrowser
 def _check_yaml(self, opt, save_yaml):
     """Make sure the given option may be set in autoconfig.yml."""
     if save_yaml and opt.no_autoconfig:
         raise configexc.NoAutoconfigError(opt.name)
コード例 #2
0
 def _check_yaml(self, opt: 'configdata.Option', save_yaml: bool) -> None:
     """Make sure the given option may be set in autoconfig.yml."""
     if save_yaml and opt.no_autoconfig:
         raise configexc.NoAutoconfigError(opt.name)
コード例 #3
0
ファイル: test_configexc.py プロジェクト: mkonig/qutebrowser
def test_no_autoconfig_error():
    e = configexc.NoAutoconfigError('opt')
    expected = "The opt setting can only be set in config.py!"
    assert str(e) == expected