示例#1
0
    def write(self) -> None:
        self.hideout.write()
        self.mail.write()
        self.inventory.write()

        atomic_write(self.pmc.json(exclude_defaults=True), self.pmc_profile_path)
        atomic_write(self.scav.json(exclude_defaults=True), self.scav_profile_path)
示例#2
0
 def write(self) -> None:
     atomic_write(
         self.dialogues.json(by_alias=True,
                             exclude_unset=False,
                             exclude_none=True,
                             indent=4),
         self.path,
     )
示例#3
0
 def write(self) -> None:
     atomic_write(ujson.dumps(self.metadata, indent=4), self.meta_path)
示例#4
0
文件: accounts.py 项目: socek/jet_py
 def __write(self) -> None:
     self.path.parent.mkdir(exist_ok=True, parents=True)
     accounts = [a.dict() for a in self.accounts]
     atomic_write(json.dumps(accounts, indent=4, ensure_ascii=False),
                  self.path)