pyright-conf
All checks were successful
Deploy on push / deploy (push) Successful in 57s

This commit is contained in:
Untone 2025-02-19 00:21:51 +03:00
parent 41d8253094
commit 2939cd8adc
2 changed files with 28 additions and 3 deletions

View File

@ -95,8 +95,8 @@ async def create_draft(_, info, draft_input):
# Проверяем обязательные поля # Проверяем обязательные поля
if "body" not in draft_input or not draft_input["body"]: if "body" not in draft_input or not draft_input["body"]:
draft_input["body"] = "" # Пустая строка вместо NULL draft_input["body"] = "" # Пустая строка вместо NULL
try: try:
with local_session() as session: with local_session() as session:
# Remove id from input if present since it's auto-generated # Remove id from input if present since it's auto-generated
@ -105,7 +105,7 @@ async def create_draft(_, info, draft_input):
# Добавляем текущее время создания # Добавляем текущее время создания
draft_input["created_at"] = int(time.time()) draft_input["created_at"] = int(time.time())
draft = Draft(created_by=author_id, **draft_input) draft = Draft(created_by=author_id, **draft_input)
session.add(draft) session.add(draft)
session.commit() session.commit()

View File

@ -0,0 +1,25 @@
{
"include": [
"."
],
"exclude": [
"**/node_modules",
"**/__pycache__",
"**/.*"
],
"defineConstant": {
"DEBUG": true
},
"venvPath": ".",
"venv": ".venv",
"pythonVersion": "3.11",
"typeCheckingMode": "strict",
"reportMissingImports": true,
"reportMissingTypeStubs": false,
"reportUnknownMemberType": false,
"reportUnknownParameterType": false,
"reportUnknownVariableType": false,
"reportUnknownArgumentType": false,
"reportPrivateUsage": false,
"reportUntypedFunctionDecorator": false
}