Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve type signature for _RuleList #3455

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tornado/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def request_callable(request):
from tornado.log import app_log
from tornado.util import basestring_type, import_object, re_unescape, unicode_type

from typing import Any, Union, Optional, Awaitable, List, Dict, Pattern, Tuple, overload
from typing import Any, Union, Optional, Awaitable, List, Dict, Pattern, Tuple, overload, Sequence


class Router(httputil.HTTPServerConnectionDelegate):
Expand Down Expand Up @@ -286,7 +286,7 @@ def finish(self) -> None:

# _RuleList can either contain pre-constructed Rules or a sequence of
# arguments to be passed to the Rule constructor.
_RuleList = List[
_RuleList = Sequence[
Union[
"Rule",
List[Any], # Can't do detailed typechecking of lists.
Expand Down