🚨 Added object inheritance [skip ci]

This commit is contained in:
Nikhil Badyal
2023-08-25 15:56:57 +05:30
parent 77377cdd48
commit c7da3ab247
7 changed files with 8 additions and 7 deletions
+1
View File
@@ -52,6 +52,7 @@ ignore = [
"PTH122", #os-path-splitext "PTH122", #os-path-splitext
"TRY301", #raise-within-try "TRY301", #raise-within-try
"PERF203", #try-except-in-loop "PERF203", #try-except-in-loop
"UP004" #useless-object-inheritance
] ]
fix = true fix = true
show-fixes = true show-fixes = true
+1 -1
View File
@@ -13,7 +13,7 @@ from src.exceptions import DownloadError, PatchingFailedError, UnknownError
from src.utils import slugify from src.utils import slugify
class APP: class APP(object):
"""Patched APK.""" """Patched APK."""
def __init__(self: Self, app_name: str, config: RevancedConfig) -> None: def __init__(self: Self, app_name: str, config: RevancedConfig) -> None:
+1 -1
View File
@@ -11,7 +11,7 @@ default_patches_json = default_patches
default_integrations = "https://github.com/revanced/revanced-integrations/releases/latest" default_integrations = "https://github.com/revanced/revanced-integrations/releases/latest"
class RevancedConfig: class RevancedConfig(object):
"""Revanced Configurations.""" """Revanced Configurations."""
def __init__(self: Self, env: Env) -> None: def __init__(self: Self, env: Env) -> None:
+1 -1
View File
@@ -16,7 +16,7 @@ from src.exceptions import DownloadError
from src.utils import handle_request_response from src.utils import handle_request_response
class Downloader: class Downloader(object):
"""Files downloader.""" """Files downloader."""
def __init__(self: Self, config: RevancedConfig) -> None: def __init__(self: Self, config: RevancedConfig) -> None:
+1 -1
View File
@@ -10,7 +10,7 @@ from src.downloader.uptodown import UptoDown
from src.exceptions import DownloadError from src.exceptions import DownloadError
class DownloaderFactory: class DownloaderFactory(object):
"""Downloader Factory.""" """Downloader Factory."""
@staticmethod @staticmethod
+1 -1
View File
@@ -12,7 +12,7 @@ from src.patches import Patches
from src.utils import possible_archs from src.utils import possible_archs
class Parser: class Parser(object):
"""Revanced Parser.""" """Revanced Parser."""
CLI_JAR = "-jar" CLI_JAR = "-jar"
+2 -2
View File
@@ -12,7 +12,7 @@ from src.config import RevancedConfig
from src.exceptions import AppNotFoundError, PatchesJsonLoadError from src.exceptions import AppNotFoundError, PatchesJsonLoadError
class Patches: class Patches(object):
"""Revanced Patches.""" """Revanced Patches."""
revanced_package_names: ClassVar[Dict[str, str]] = { revanced_package_names: ClassVar[Dict[str, str]] = {
@@ -197,7 +197,7 @@ class Patches:
return total_patches return total_patches
class PatchLoader: class PatchLoader(object):
"""Patch Loader.""" """Patch Loader."""
@staticmethod @staticmethod