From 08d35ed2b336749d7716a85caa0ea6d9f310ed3b Mon Sep 17 00:00:00 2001 From: Desiders <47452083+Desiders@users.noreply.github.com> Date: Sun, 6 Nov 2022 15:33:48 +0300 Subject: [PATCH] Removed an old now non-working feature from documentation (#1060) * Removed an old now non-working feature * Create 1060.doc.rst * Removed unused `typing.Union` --- CHANGES/1060.doc.rst | 1 + aiogram/dispatcher/router.py | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) create mode 100644 CHANGES/1060.doc.rst diff --git a/CHANGES/1060.doc.rst b/CHANGES/1060.doc.rst new file mode 100644 index 0000000000..3275c1ad94 --- /dev/null +++ b/CHANGES/1060.doc.rst @@ -0,0 +1 @@ +Removed an old now non-working feature diff --git a/aiogram/dispatcher/router.py b/aiogram/dispatcher/router.py index 9bb12cfd36..088f72105a 100644 --- a/aiogram/dispatcher/router.py +++ b/aiogram/dispatcher/router.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Any, Dict, Final, Generator, List, Optional, Set, Union +from typing import Any, Dict, Final, Generator, List, Optional, Set from ..types import TelegramObject from .event.bases import REJECTED, UNHANDLED @@ -179,12 +179,10 @@ def parent_router(self, router: Router) -> None: self._parent_router = router router.sub_routers.append(self) - def include_router(self, router: Union[Router, str]) -> Router: + def include_router(self, router: Router) -> Router: """ Attach another router. - Can be attached directly or by import string in format ":" - :param router: :return: """