mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-20 19:01:16 +08:00
* Improve type hints of URL conf & include() The type of `urlpatterns` list is `List[Union[URLPattern, URLResolver]]`. * https://docs.djangoproject.com/en/dev/ref/urls/#django.urls.include * https://docs.djangoproject.com/en/4.0/ref/urls/ * Alias _AnyURL = Union[URLPattern, URLResolver] * Fix extract_views_from_urlpatterns
8 lines
196 B
Python
8 lines
196 B
Python
from typing import List, Optional
|
|
|
|
from django.urls import URLPattern, _AnyURL
|
|
|
|
urlpatterns: List[_AnyURL] = ...
|
|
|
|
def staticfiles_urlpatterns(prefix: Optional[str] = ...) -> List[URLPattern]: ...
|