mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 05:51:53 +08:00
run black over stubs, add checking to travis
This commit is contained in:
@@ -6,7 +6,6 @@ from django.db.models.query import QuerySet
|
||||
from django.template.response import TemplateResponse
|
||||
from django.views.generic.base import ContextMixin, TemplateResponseMixin, View
|
||||
|
||||
|
||||
class SingleObjectMixin(ContextMixin):
|
||||
model: Any = ...
|
||||
queryset: Any = ...
|
||||
@@ -18,16 +17,12 @@ class SingleObjectMixin(ContextMixin):
|
||||
def get_object(self, queryset: Optional[QuerySet] = ...) -> Model: ...
|
||||
def get_queryset(self) -> QuerySet: ...
|
||||
def get_slug_field(self) -> str: ...
|
||||
def get_context_object_name(
|
||||
self, obj: Union[Dict[str, str], Model]
|
||||
) -> Optional[str]: ...
|
||||
def get_context_object_name(self, obj: Union[Dict[str, str], Model]) -> Optional[str]: ...
|
||||
def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ...
|
||||
|
||||
class BaseDetailView(SingleObjectMixin, View):
|
||||
object: Any = ...
|
||||
def get(
|
||||
self, request: WSGIRequest, *args: Any, **kwargs: Any
|
||||
) -> TemplateResponse: ...
|
||||
def get(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> TemplateResponse: ...
|
||||
|
||||
class SingleObjectTemplateResponseMixin(TemplateResponseMixin):
|
||||
template_name_field: Any = ...
|
||||
|
||||
Reference in New Issue
Block a user