def save(self, directory: Optional[str] = None): configs = attr.asdict(self, recurse=True) config_file = self._config_file(directory) save_as(configs, config_file)
def save_feed(self, feed: Feed): feed_data = attr.asdict(feed, recurse=True) save_as(feed_data, self.local_file)
def _create(cls, directory: Optional[str] = None) -> "Config": config_file = cls._config_file(directory) config = Config(config_dir=config_file) configs = attr.asdict(config, recurse=True) save_as(configs, config_file) return config