summaryrefslogtreecommitdiff
path: root/adblock/adblock.pyi
diff options
context:
space:
mode:
authorÁrni Dagur <arni@dagur.eu>2020-07-27 20:35:50 +0000
committerGitHub <noreply@github.com>2020-07-27 20:35:50 +0000
commit25684535e85a8bbb05b65b0da2304273d1d90ca0 (patch)
treeaad63588ac9eafe99ddd0d3ed847a3726d947271 /adblock/adblock.pyi
parentdc35e6044c249261dfc46eff831d5885a993eb0f (diff)
Update upstream library to 0.3.0, respond to API changes (#10)
* Update upstream library to 0.3.0, respond to API changes * Change pypi publishing criteria in CI * Create test to make sure the version numbers are the same everywhere
Diffstat (limited to 'adblock/adblock.pyi')
-rw-r--r--adblock/adblock.pyi28
1 files changed, 15 insertions, 13 deletions
diff --git a/adblock/adblock.pyi b/adblock/adblock.pyi
index 50a61e8..82f753b 100644
--- a/adblock/adblock.pyi
+++ b/adblock/adblock.pyi
@@ -11,7 +11,7 @@ class BlockerResult:
11 def __repr__(self) -> str: 11 def __repr__(self) -> str:
12 pass 12 pass
13 13
14class HostnameSpecificResources: 14class UrlSpecificResources:
15 hide_selectors: Set[str] 15 hide_selectors: Set[str]
16 style_selectors: Dict[str, List[str]] 16 style_selectors: Dict[str, List[str]]
17 exceptions: Set[str] 17 exceptions: Set[str]
@@ -19,14 +19,16 @@ class HostnameSpecificResources:
19 def __repr__(self) -> str: 19 def __repr__(self) -> str:
20 pass 20 pass
21 21
22class FilterSet:
23 def __init__(self, debug: bool = False) -> None:
24 pass
25 def add_filter_list(self, filter_list: str, format: str) -> None:
26 pass
27 def add_filters(self, filters: List[str], format: str) -> None:
28 pass
29
22class Engine: 30class Engine:
23 def __init__( 31 def __init__(self, filter_set: FilterSet, optimize: bool = True) -> None:
24 self,
25 network_filters: Optional[List[str]] = None,
26 load_network: bool = True,
27 load_cosmetic: bool = False,
28 debug: bool = False,
29 ) -> None:
30 pass 32 pass
31 def check_network_urls( 33 def check_network_urls(
32 self, url: str, source_url: str, request_type: str 34 self, url: str, source_url: str, request_type: str
@@ -60,17 +62,17 @@ class Engine:
60 pass 62 pass
61 def deserialize_from_file(self, file: str) -> None: 63 def deserialize_from_file(self, file: str) -> None:
62 pass 64 pass
63 def add_filter_list(self, filter_list: str) -> None:
64 pass
65 def filter_exists(self, filter: str) -> bool: 65 def filter_exists(self, filter: str) -> bool:
66 pass 66 pass
67 def tags_enable(self, tags: List[str]) -> None: 67 def use_tags(self, tags: List[str]) -> None:
68 pass
69 def enable_tags(self, tags: List[str]) -> None:
68 pass 70 pass
69 def tags_disable(self, tags: List[str]) -> None: 71 def disable_tags(self, tags: List[str]) -> None:
70 pass 72 pass
71 def tag_exists(self, tag: str) -> bool: 73 def tag_exists(self, tag: str) -> bool:
72 pass 74 pass
73 def hostname_cosmetic_resources(self, hostname: str) -> HostnameSpecificResources: 75 def url_cosmetic_resources(self, url: str) -> UrlSpecificResources:
74 pass 76 pass
75 def hidden_class_id_selectors( 77 def hidden_class_id_selectors(
76 self, classes: List[str], ids: List[str], exceptions: Set[str] 78 self, classes: List[str], ids: List[str], exceptions: Set[str]