summaryrefslogtreecommitdiff
path: root/adblock/adblock.pyi
diff options
context:
space:
mode:
Diffstat (limited to 'adblock/adblock.pyi')
-rw-r--r--adblock/adblock.pyi11
1 files changed, 9 insertions, 2 deletions
diff --git a/adblock/adblock.pyi b/adblock/adblock.pyi
index 0515674..83d2492 100644
--- a/adblock/adblock.pyi
+++ b/adblock/adblock.pyi
@@ -21,10 +21,14 @@ class BadFilterAddUnsupported(BlockerException):
21class FilterExists(BlockerException): 21class FilterExists(BlockerException):
22 pass 22 pass
23 23
24class AddResourceError(BlockerException):
25 pass
26
24class BlockerResult: 27class BlockerResult:
25 matched: bool 28 matched: bool
26 explicit_cancel: bool 29 explicit_cancel: bool
27 important: bool 30 important: bool
31 redirect_type: Optional[str]
28 redirect: Optional[str] 32 redirect: Optional[str]
29 exception: Optional[str] 33 exception: Optional[str]
30 filter: Optional[str] 34 filter: Optional[str]
@@ -43,14 +47,15 @@ class UrlSpecificResources:
43class FilterSet: 47class FilterSet:
44 def __init__(self, debug: bool = False) -> None: 48 def __init__(self, debug: bool = False) -> None:
45 pass 49 pass
46 def add_filter_list(self, filter_list: str, format: str = "standard") -> None: 50 def add_filter_list(self, filter_list: str, format: str = "standard", include_redirect_urls: bool = False) -> None:
47 pass 51 pass
48 def add_filters(self, filters: List[str], format: str = "standard") -> None: 52 def add_filters(self, filters: List[str], format: str = "standard", include_redirect_urls: bool = False) -> None:
49 pass 53 pass
50 54
51class Engine: 55class Engine:
52 def __init__(self, filter_set: FilterSet, optimize: bool = True) -> None: 56 def __init__(self, filter_set: FilterSet, optimize: bool = True) -> None:
53 pass 57 pass
58
54 def check_network_urls( 59 def check_network_urls(
55 self, url: str, source_url: str, request_type: str 60 self, url: str, source_url: str, request_type: str
56 ) -> BlockerResult: 61 ) -> BlockerResult:
@@ -93,6 +98,8 @@ class Engine:
93 pass 98 pass
94 def tag_exists(self, tag: str) -> bool: 99 def tag_exists(self, tag: str) -> bool:
95 pass 100 pass
101 def add_resource(self, name: str, content_type: str, content: str) -> bool:
102 pass
96 def url_cosmetic_resources(self, url: str) -> UrlSpecificResources: 103 def url_cosmetic_resources(self, url: str) -> UrlSpecificResources:
97 pass 104 pass
98 def hidden_class_id_selectors( 105 def hidden_class_id_selectors(