Обновил структуру проекта

This commit is contained in:
Даниил Грабарь
2026-10-01 17:38:49 +10:00
parent 2e23b63689
commit 9e551a2ca9
5 changed files with 170 additions and 86 deletions
+4 -2
View File
@@ -10,12 +10,12 @@ from pydantic_ai.providers.openai_codex import (
class FileCodexCredentionalSource(OpenAICodexCredentialSource):
def __init__(self,
path: Path,
path: str| Path,
encoding: str="utf-8",
ensure_ascii: bool=False,
indent: int=2):
super().__init__()
self._path = path
self._path = Path(path)
self._encoding=encoding
self._ensure_ascii=ensure_ascii
self._indent=indent
@@ -32,6 +32,8 @@ class FileCodexCredentionalSource(OpenAICodexCredentialSource):
)
async def save(self, credentials: OpenAICodexCredentials) -> None:
self.path.parent.mkdir(parents=True , exist_ok=True)
self._path.write_text(
json.dumps(
asdict(credentials),