示例#1
0
 def save(self, directory: Optional[str] = None):
     configs = attr.asdict(self, recurse=True)
     config_file = self._config_file(directory)
     save_as(configs, config_file)
示例#2
0
 def save_feed(self, feed: Feed):
     feed_data = attr.asdict(feed, recurse=True)
     save_as(feed_data, self.local_file)
示例#3
0
 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