Skip to content

Commit

Permalink
Improve stubs for runserver management command. (#1037)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
PIG208 authored Sep 19, 2022
1 parent 9a41aa6 commit d732631
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions django-stubs/core/management/commands/runserver.pyi
Original file line number Diff line number Diff line change
@@ -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.servers.basehttp import WSGIServer

class Command(BaseCommand):
default_addr: str = ...
default_addr_ipv6: str = ...
default_port: 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: ...

0 comments on commit d732631

Please sign in to comment.