From 0fc718deebc2adec45abf9ad32d1e70634005881 Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Fri, 17 Nov 2023 00:27:30 +0200 Subject: [PATCH 1/2] Small changes in the pending changelog --- CHANGES/{1302.doc => 1302.doc.rst} | 2 +- CHANGES/{1331.misc => 1331.misc.rst} | 2 +- CHANGES/1332.bugfix.rst | 2 +- CHANGES/1343.feature.rst | 2 +- CHANGES/1360.bugfix.rst | 2 +- CHANGES/1361.misc | 1 - CHANGES/1361.misc.rst | 1 + 7 files changed, 6 insertions(+), 6 deletions(-) rename CHANGES/{1302.doc => 1302.doc.rst} (68%) rename CHANGES/{1331.misc => 1331.misc.rst} (74%) delete mode 100644 CHANGES/1361.misc create mode 100644 CHANGES/1361.misc.rst diff --git a/CHANGES/1302.doc b/CHANGES/1302.doc.rst similarity index 68% rename from CHANGES/1302.doc rename to CHANGES/1302.doc.rst index 80cc5492..31220d96 100644 --- a/CHANGES/1302.doc +++ b/CHANGES/1302.doc.rst @@ -1 +1 @@ -Corrected grammatical errors, improved sentence structures, translation for migration 2.x-3.x \ No newline at end of file +Corrected grammatical errors, improved sentence structures, translation for migration 2.x-3.x diff --git a/CHANGES/1331.misc b/CHANGES/1331.misc.rst similarity index 74% rename from CHANGES/1331.misc rename to CHANGES/1331.misc.rst index 375f975c..38d7efa4 100644 --- a/CHANGES/1331.misc +++ b/CHANGES/1331.misc.rst @@ -1 +1 @@ -Prevent update handling task pointers from being garbage collected, backport from 2.x \ No newline at end of file +Prevent update handling task pointers from being garbage collected, backport from 2.x diff --git a/CHANGES/1332.bugfix.rst b/CHANGES/1332.bugfix.rst index 004cfd1d..9cf7d48c 100644 --- a/CHANGES/1332.bugfix.rst +++ b/CHANGES/1332.bugfix.rst @@ -1 +1 @@ - Fixed ``parse_mode`` in ``send_copy`` helper. Disable by default. + Fixed :code:`parse_mode` argument in the in :code:`Message.send_copy` shortcut. Disable by default. diff --git a/CHANGES/1343.feature.rst b/CHANGES/1343.feature.rst index 6ae25cd3..80960dc7 100644 --- a/CHANGES/1343.feature.rst +++ b/CHANGES/1343.feature.rst @@ -1 +1 @@ -The new FSM strategy CHAT_TOPIC, which sets the state for the entire topic in the chat, also works in private messages and regular groups without topics. +Added the new FSM strategy :code:`CHAT_TOPIC`, which sets the state for the entire topic in the chat, also works in private messages and regular groups without topics. diff --git a/CHANGES/1360.bugfix.rst b/CHANGES/1360.bugfix.rst index e02d0ea4..b2a272b1 100644 --- a/CHANGES/1360.bugfix.rst +++ b/CHANGES/1360.bugfix.rst @@ -1 +1 @@ -Added current handler to filters, so that flags can be retrieved from it. +Added ability to get handler flags from filters. diff --git a/CHANGES/1361.misc b/CHANGES/1361.misc deleted file mode 100644 index 6e6413d8..00000000 --- a/CHANGES/1361.misc +++ /dev/null @@ -1 +0,0 @@ -Added pydantic v2.5 support. diff --git a/CHANGES/1361.misc.rst b/CHANGES/1361.misc.rst new file mode 100644 index 00000000..9b1fe953 --- /dev/null +++ b/CHANGES/1361.misc.rst @@ -0,0 +1 @@ +Added :code:`pydantic` v2.5 support. From c208bcf748747c503f3cc2ac81cb6c9fbfcb2496 Mon Sep 17 00:00:00 2001 From: JRoot Junior Date: Fri, 17 Nov 2023 00:28:47 +0200 Subject: [PATCH 2/2] Reformat code --- aiogram/dispatcher/event/handler.py | 2 +- tests/test_dispatcher/test_event/test_handler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aiogram/dispatcher/event/handler.py b/aiogram/dispatcher/event/handler.py index 1045e667..1a353e1e 100644 --- a/aiogram/dispatcher/event/handler.py +++ b/aiogram/dispatcher/event/handler.py @@ -4,7 +4,7 @@ import inspect import warnings from dataclasses import dataclass, field from functools import partial -from typing import Any, Callable, Dict, List, Optional, Tuple, Set +from typing import Any, Callable, Dict, List, Optional, Set, Tuple from magic_filter.magic import MagicFilter as OriginalMagicFilter diff --git a/tests/test_dispatcher/test_event/test_handler.py b/tests/test_dispatcher/test_event/test_handler.py index c2b11cff..b5492dce 100644 --- a/tests/test_dispatcher/test_event/test_handler.py +++ b/tests/test_dispatcher/test_event/test_handler.py @@ -1,5 +1,5 @@ import functools -from typing import Any, Dict, Union, Callable, Set +from typing import Any, Callable, Dict, Set, Union import pytest from magic_filter import F as A