Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: abp/filters/__init__.py

Issue 29979570: Issue 7205 - Change classes that use ALL_CAPS naming to be CamelCase (Closed) Base URL: https://hg.adblockplus.org/python-abp/
Patch Set: Created Jan. 12, 2019, 1:21 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | abp/filters/parser.py » ('j') | abp/filters/parser.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: abp/filters/__init__.py
===================================================================
--- a/abp/filters/__init__.py
+++ b/abp/filters/__init__.py
@@ -58,8 +58,8 @@
Constants for code that works with filter lists:
- - SELECTOR_TYPE - Namespace for constants that determine how the filter
- matches content (for example: SELECTOR_TYPE.CSS):
+ - SelectorType - Namespace for constants that determine how the filter
+ matches content (for example: SelectorType.CSS):
- URL_PATTERN - Match URL against a pattern (see
https://adblockplus.org/filters#basic),
@@ -68,16 +68,16 @@
- XCSS - CSS selector with extensions (to emulate CSS4),
- ABP_SIMPLE - Deprecated simplified element selection syntax.
- - FILTER_ACTION - Namespace for constants that determine what the filter does
- with selected content (for example: FILTER_ACTION.BLOCK):
+ - FilterAction - Namespace for constants that determine what the filter does
+ with selected content (for example: FilterAction.BLOCK):
- BLOCK - Block the request,
- ALLOW - Allow the request (even if blocked by other filters),
- HIDE - Hide selected element,
- SHOW - Show selected element (even if hidden by other filters).
- - FILTER_OPTION - Namespace for filter option constants (for example
- FILTER_OPTION.IMAGE). See https://adblockplus.org/filters#options for the
+ - FilterOption - Namespace for filter option constants (for example
+ FilterOption.IMAGE). See https://adblockplus.org/filters#options for the
full list of options.
See docstrings of module members for further information.
@@ -90,9 +90,9 @@
"""
from .parser import (
- FILTER_ACTION,
- FILTER_OPTION,
- SELECTOR_TYPE,
+ FilterAction,
+ FilterOption,
+ SelectorType,
ParseError,
parse_filterlist,
parse_line,
@@ -110,9 +110,9 @@
__all__ = [
# Constants
- 'FILTER_ACTION',
- 'FILTER_OPTION',
- 'SELECTOR_TYPE',
+ 'FilterAction',
+ 'FilterOption',
+ 'SelectorType',
# Exceptions
'ParseError',
'IncludeError',
« no previous file with comments | « no previous file | abp/filters/parser.py » ('j') | abp/filters/parser.py » ('J')

Powered by Google App Engine
This is Rietveld