mirror of
https://github.com/revanced/revanced-static-api.git
synced 2025-04-30 06:34:30 +02:00
chore: Remformat code
This commit is contained in:
parent
57db41441b
commit
16c7ca4668
@ -2,6 +2,7 @@ from abc import abstractmethod
|
||||
import asyncio
|
||||
import aiohttp
|
||||
|
||||
|
||||
class Api:
|
||||
_api_key: str | None
|
||||
|
||||
@ -56,6 +57,7 @@ class Api:
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
|
||||
class GitHubApi(Api):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
@ -92,6 +94,7 @@ class GitHubApi(Api):
|
||||
contributors.sort(key=sort_and_delete_key, reverse=True)
|
||||
return contributors
|
||||
|
||||
# TODO: Return a list of objects instead of a dict.
|
||||
async def get_release(
|
||||
self, repository: str, all: bool = False, prerelease: bool = False
|
||||
) -> dict | list:
|
||||
@ -104,7 +107,6 @@ class GitHubApi(Api):
|
||||
Returns:
|
||||
dict: The transformed release dict.
|
||||
"""
|
||||
|
||||
return {
|
||||
# TODO: Check if theres any need for this: 'id': release['id'].
|
||||
"tag": release["tag_name"],
|
||||
@ -155,5 +157,3 @@ class GitHubApi(Api):
|
||||
async def is_rate_limited(self) -> bool:
|
||||
async with self._client_session.get('https://api.github.com/rate_limit') as resp:
|
||||
return (await resp.json())["rate"]["remaining"] == 0
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user