🚨 Lint Fixes

This commit is contained in:
pre-commit-ci[bot]
2024-01-29 17:06:45 +00:00
committed by Nikhil Badyal
parent f9b3bc6303
commit 6b8b09049f
16 changed files with 28 additions and 4 deletions
+1
View File
@@ -1,4 +1,5 @@
"""Entry point.""" """Entry point."""
import sys import sys
from environs import Env from environs import Env
+1
View File
@@ -1,4 +1,5 @@
"""Status check.""" """Status check."""
import re import re
from pathlib import Path from pathlib import Path
+1
View File
@@ -1,4 +1,5 @@
"""Class to represent apk to be patched.""" """Class to represent apk to be patched."""
import concurrent import concurrent
import hashlib import hashlib
import pathlib import pathlib
+1
View File
@@ -1,4 +1,5 @@
"""Revanced Configurations.""" """Revanced Configurations."""
from pathlib import Path from pathlib import Path
from typing import Self from typing import Self
+1
View File
@@ -1,4 +1,5 @@
"""Downloader Class.""" """Downloader Class."""
from typing import Any, Self from typing import Any, Self
import requests import requests
+1
View File
@@ -1,4 +1,5 @@
"""APK Monk Downloader Class.""" """APK Monk Downloader Class."""
import re import re
from typing import Any, Self from typing import Any, Self
+1
View File
@@ -1,4 +1,5 @@
"""APK Pure Downloader Class.""" """APK Pure Downloader Class."""
from typing import Any, Self from typing import Any, Self
from src.app import APP from src.app import APP
+1
View File
@@ -1,4 +1,5 @@
"""APK SOS Downloader Class.""" """APK SOS Downloader Class."""
from typing import Any, Self from typing import Any, Self
import requests import requests
+1
View File
@@ -1,4 +1,5 @@
"""Downloader Class.""" """Downloader Class."""
import os import os
import subprocess import subprocess
from pathlib import Path from pathlib import Path
+1
View File
@@ -1,4 +1,5 @@
"""Downloader Factory.""" """Downloader Factory."""
from src.config import RevancedConfig from src.config import RevancedConfig
from src.downloader.apkmirror import ApkMirror from src.downloader.apkmirror import ApkMirror
from src.downloader.apkmonk import ApkMonk from src.downloader.apkmonk import ApkMonk
+1
View File
@@ -1,4 +1,5 @@
"""Github Downloader.""" """Github Downloader."""
import re import re
from typing import Self from typing import Self
from urllib.parse import urlparse from urllib.parse import urlparse
+1
View File
@@ -1,4 +1,5 @@
"""Google Drive downloader Class.""" """Google Drive downloader Class."""
from typing import Any, Self from typing import Any, Self
import gdown import gdown
+1
View File
@@ -1,4 +1,5 @@
"""Upto Down Downloader.""" """Upto Down Downloader."""
from typing import Any, Self from typing import Any, Self
import requests import requests
+1
View File
@@ -1,4 +1,5 @@
"""Possible Exceptions.""" """Possible Exceptions."""
from typing import Any, Self from typing import Any, Self
+13 -4
View File
@@ -1,4 +1,5 @@
"""Revanced Parser.""" """Revanced Parser."""
from pathlib import Path from pathlib import Path
from subprocess import PIPE, Popen from subprocess import PIPE, Popen
from time import perf_counter from time import perf_counter
@@ -113,16 +114,24 @@ class Parser(object):
if app.space_formatted: if app.space_formatted:
for patch in patches: for patch in patches:
normalized_patch = patch["name"].lower().replace(" ", "-") normalized_patch = patch["name"].lower().replace(" ", "-")
self.include(patch["name"]) if normalized_patch not in app.exclude_request else self.exclude( (
patch["name"], self.include(patch["name"])
if normalized_patch not in app.exclude_request
else self.exclude(
patch["name"],
)
) )
for patch in patches_dict["universal_patch"]: for patch in patches_dict["universal_patch"]:
normalized_patch = patch["name"].lower().replace(" ", "-") normalized_patch = patch["name"].lower().replace(" ", "-")
self.include(patch["name"]) if normalized_patch in app.include_request else () self.include(patch["name"]) if normalized_patch in app.include_request else ()
else: else:
for patch in patches: for patch in patches:
self.include(patch["name"]) if patch["name"] not in app.exclude_request else self.exclude( (
patch["name"], self.include(patch["name"])
if patch["name"] not in app.exclude_request
else self.exclude(
patch["name"],
)
) )
for patch in patches_dict["universal_patch"]: for patch in patches_dict["universal_patch"]:
self.include(patch["name"]) if patch["name"] in app.include_request else () self.include(patch["name"]) if patch["name"] in app.include_request else ()
+1
View File
@@ -1,4 +1,5 @@
"""Utilities.""" """Utilities."""
import re import re
import subprocess import subprocess
import sys import sys