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)
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)
def test_no_autoconfig_error(): e = configexc.NoAutoconfigError('opt') expected = "The opt setting can only be set in config.py!" assert str(e) == expected