mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-16 00:37:11 +08:00
Improve stubs for runserver management command. (#1037)
This adds type annotation for `run`, `get_handler`, `inner_run` and
`server_cls`.
Source code:
03eec9ff6c/django/core/management/commands/runserver.py
This commit is contained in:
@@ -1,7 +1,15 @@
|
|||||||
|
from typing import Any, Type
|
||||||
|
|
||||||
|
from django.core.handlers.wsgi import WSGIHandler
|
||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
from django.core.servers.basehttp import WSGIServer
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
default_addr: str = ...
|
default_addr: str = ...
|
||||||
default_addr_ipv6: str = ...
|
default_addr_ipv6: str = ...
|
||||||
default_port: str = ...
|
default_port: str = ...
|
||||||
protocol: str = ...
|
protocol: str = ...
|
||||||
|
server_cls: Type[WSGIServer] = ...
|
||||||
|
def run(self, **options: Any) -> None: ...
|
||||||
|
def get_handler(self, *args: Any, **options: Any) -> WSGIHandler: ...
|
||||||
|
def inner_run(self, *args: Any, **options: Any) -> None: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user