code: def _settings_from_file(self):
          
          settings = load_source(
              'settings', text_type(self.user_dir.joinpath('settings.py')))
          return {key: getattr(settings, key)
                  for key in const.DEFAULT_SETTINGS.keys()
                  if hasattr(settings, key)}
docs: Loads settings from file.