コード例 #1
0
ファイル: profile.py プロジェクト: JustEmuTarkov/jet_py
    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)