Skip to content

Commit

Permalink
fix: remove staticmethod
Browse files Browse the repository at this point in the history
chore: apply formatting and ruuuuuff
  • Loading branch information
JacobCoffee committed Sep 16, 2024
1 parent ac115f1 commit c2409fe
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions downloads/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,16 @@ class ReleaseFeed(Feed):
@staticmethod
def link() -> str:
"""Return the URL to the main downloads page."""
return reverse('downloads:download')
return reverse("downloads:download")

def get_feed(self, obj: Any, request: WSGIRequest) -> Feed:
"""Store the request object for later use."""
self.request = request
return super().get_feed(obj, request)

@staticmethod
def items() -> list[dict[str, Any]]:
def items(self) -> list[dict[str, Any]]:
"""Return the latest Python releases."""
return Release.objects.filter(is_published=True).order_by('-release_date')[:10]
return Release.objects.filter(is_published=True).order_by("-release_date")[:10]

@staticmethod
def _fetch_releases(url: str) -> list[dict[str, Any]]:
Expand Down

0 comments on commit c2409fe

Please sign in to comment.