Skip to content

Commit 8265075

Browse files
committed
Improve stubs for runserver management command.
This adds type annotation for `run`, `get_handler`, `inner_run` and `server_cls`. Source code: https://github.com/django/django/blob/03eec9ff6cc78e7c1bcf88bb76ecd11f0d433c72/django/core/management/commands/runserver.py
1 parent 2a6f464 commit 8265075

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1+
from typing import Any, Type
2+
3+
from django.core.handlers.wsgi import WSGIHandler
14
from django.core.management.base import BaseCommand
5+
from django.core.servers.basehttp import WSGIServer
26

37
class Command(BaseCommand):
48
default_addr: str = ...
59
default_addr_ipv6: str = ...
610
default_port: str = ...
711
protocol: str = ...
12+
server_cls: Type[WSGIServer] = ...
13+
def run(self, **options: Any) -> None: ...
14+
def get_handler(self, *args: Any, **options: Any) -> WSGIHandler: ...
15+
def inner_run(self, *args: Any, **options: Any) -> None: ...

0 commit comments

Comments
 (0)