Insert several empty lines
@@ -207,15 +207,20 @@ class RustLanguage(Language):
def __init__(self, *, config: Optional[Dict[str, Any]] = None):
if config is None:
config = get_config().get('languages', {}).get('rust', {})
+
if 'list_dependencies_backend' in config:
list_dependencies_backend = config['list_dependencies_backend']
+
if not isinstance(list_dependencies_backend, dict):
raise RuntimeError('`languages.rust.list_dependencies_backend` must be `dict`')
if 'kind' not in list_dependencies_backend:
raise RuntimeError('missing `languages.rust.list_dependencies_backend.kind`')
+
list_dependencies_backend_kind = list_dependencies_backend['kind']
+
if not isinstance(list_dependencies_backend_kind, str):
raise RuntimeError('`languages.rust.list_dependencies_backend.kind` must be `str`')
+
if list_dependencies_backend_kind == 'none':
self._list_dependencies_backend = _NoBackend()
elif list_dependencies_backend_kind == 'cargo-udeps':
