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`
This commit is contained in:
Desiders 2022-11-06 15:33:48 +03:00 committed by GitHub
parent b287551590
commit 08d35ed2b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

1
CHANGES/1060.doc.rst Normal file
View file

@ -0,0 +1 @@
Removed an old now non-working feature

View file

@ -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 @@ class Router:
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 "<module>:<attribute>"
:param router:
:return:
"""