mirror of
https://github.com/sotam0316/docker-py-revanced.git
synced 2026-04-25 03:48:37 +09:00
🚨 Lint Fixes
This commit is contained in:
committed by
Nikhil Badyal
parent
d2347f34bf
commit
c436c4bc98
@@ -1,6 +1,8 @@
|
||||
"""APK Pure Downloader Class."""
|
||||
|
||||
from functools import cmp_to_key
|
||||
from typing import Any, Self
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
|
||||
import requests
|
||||
from bs4 import BeautifulSoup
|
||||
@@ -35,8 +37,6 @@ class ApkPure(Downloader):
|
||||
|
||||
def _compare_dls(self: Self, dl1: str, dl2: str) -> int:
|
||||
"""Compare two dls of same type (apk or xapk) to prioritise the archs on lower indices."""
|
||||
from urllib.parse import parse_qs, urlparse
|
||||
|
||||
apk_type1 = parse_qs(urlparse(dl1).query).get("nc")
|
||||
apk_type2 = parse_qs(urlparse(dl2).query).get("nc")
|
||||
if apk_type1 and apk_type2:
|
||||
@@ -67,8 +67,6 @@ class ApkPure(Downloader):
|
||||
:param app: Name of the app
|
||||
:return: Tuple of filename and app direct download link
|
||||
"""
|
||||
from functools import cmp_to_key
|
||||
|
||||
logger.debug(f"Extracting download link from\n{page}")
|
||||
r = requests.get(page, headers=request_header, timeout=request_timeout)
|
||||
handle_request_response(r, page)
|
||||
|
||||
@@ -67,7 +67,7 @@ class Downloader(object):
|
||||
"""Extract download link from web page."""
|
||||
raise NotImplementedError(implement_method)
|
||||
|
||||
def specific_version(self: Self, app: APP, version: str) -> tuple[str, str]:
|
||||
def specific_version(self: Self, app: "APP", version: str) -> tuple[str, str]:
|
||||
"""Function to download the specified version of app..
|
||||
|
||||
:param app: Name of the application
|
||||
|
||||
Reference in New Issue
Block a user