Work around "no settings module" crash (#65)

Workaround "no settings module" crash
This commit is contained in:
Maxim Kurnikov
2019-04-12 17:14:23 +03:00
committed by GitHub
parent aeb435c8b3
commit fd06816cbb

View File

@@ -13,6 +13,9 @@ if TYPE_CHECKING:
def get_setting_sym(name: str, api: 'TypeChecker', settings_modules: List[str]) -> Optional[SymbolTableNode]:
for settings_mod_name in settings_modules:
if settings_mod_name not in api.modules:
continue
file = api.modules[settings_mod_name]
sym = file.names.get(name)
if sym is not None: