From 1834242e46258d3e5bfef8d69fd41b4cf3953ba8 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Wed, 29 Dec 2021 09:07:43 +0100 Subject: [PATCH] Fix Feed.get_object signature (#798) get_object's default implementation returns None but subclasses are allowed to override this method and make it return anything. The returned object would then be passed to other methods to publish different data for different URL parameters. https://docs.djangoproject.com/en/4.0/ref/contrib/syndication/ --- django-stubs/contrib/syndication/views.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django-stubs/contrib/syndication/views.pyi b/django-stubs/contrib/syndication/views.pyi index bf2b1b3..b59b551 100644 --- a/django-stubs/contrib/syndication/views.pyi +++ b/django-stubs/contrib/syndication/views.pyi @@ -22,6 +22,6 @@ class Feed: def item_enclosures(self, item: Model) -> List[Enclosure]: ... def feed_extra_kwargs(self, obj: None) -> Dict[Any, Any]: ... def item_extra_kwargs(self, item: Model) -> Dict[Any, Any]: ... - def get_object(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> None: ... + def get_object(self, request: WSGIRequest, *args: Any, **kwargs: Any) -> Any: ... def get_context_data(self, **kwargs: Any) -> Dict[str, Any]: ... def get_feed(self, obj: None, request: WSGIRequest) -> SyndicationFeed: ...