From 6943bfd4cce838f15e51416a20f968197c386de1 Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Sun, 31 Dec 2023 00:15:54 +0200 Subject: [PATCH] Update GiveawayWinners and PassportFile types generation configs --- .butcher/types/GiveawayWinners/replace.yml | 5 +++++ .butcher/types/PassportFile/replace.yml | 5 +++++ aiogram/types/passport_file.py | 5 +++-- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .butcher/types/GiveawayWinners/replace.yml create mode 100644 .butcher/types/PassportFile/replace.yml diff --git a/.butcher/types/GiveawayWinners/replace.yml b/.butcher/types/GiveawayWinners/replace.yml new file mode 100644 index 00000000..fb29ba77 --- /dev/null +++ b/.butcher/types/GiveawayWinners/replace.yml @@ -0,0 +1,5 @@ +annotations: + winners_selection_date: + parsed_type: + type: std + name: DateTime diff --git a/.butcher/types/PassportFile/replace.yml b/.butcher/types/PassportFile/replace.yml new file mode 100644 index 00000000..7a6af790 --- /dev/null +++ b/.butcher/types/PassportFile/replace.yml @@ -0,0 +1,5 @@ +annotations: + file_date: + parsed_type: + type: std + name: DateTime diff --git a/aiogram/types/passport_file.py b/aiogram/types/passport_file.py index 1e80048b..d95da61a 100644 --- a/aiogram/types/passport_file.py +++ b/aiogram/types/passport_file.py @@ -3,6 +3,7 @@ from __future__ import annotations from typing import TYPE_CHECKING, Any from .base import TelegramObject +from .custom import DateTime class PassportFile(TelegramObject): @@ -18,7 +19,7 @@ class PassportFile(TelegramObject): """Unique identifier for this file, which is supposed to be the same over time and for different bots. Can't be used to download or reuse the file.""" file_size: int """File size in bytes""" - file_date: int + file_date: DateTime """Unix time when the file was uploaded""" if TYPE_CHECKING: @@ -31,7 +32,7 @@ class PassportFile(TelegramObject): file_id: str, file_unique_id: str, file_size: int, - file_date: int, + file_date: DateTime, **__pydantic_kwargs: Any, ) -> None: # DO NOT EDIT MANUALLY!!!