| OLD | NEW |
| 1 # This file is part of Adblock Plus <https://adblockplus.org/>, | 1 # This file is part of Adblock Plus <https://adblockplus.org/>, |
| 2 # Copyright (C) 2006-present eyeo GmbH | 2 # Copyright (C) 2006-present eyeo GmbH |
| 3 # | 3 # |
| 4 # Adblock Plus is free software: you can redistribute it and/or modify | 4 # Adblock Plus is free software: you can redistribute it and/or modify |
| 5 # it under the terms of the GNU General Public License version 3 as | 5 # it under the terms of the GNU General Public License version 3 as |
| 6 # published by the Free Software Foundation. | 6 # published by the Free Software Foundation. |
| 7 # | 7 # |
| 8 # Adblock Plus is distributed in the hope that it will be useful, | 8 # Adblock Plus is distributed in the hope that it will be useful, |
| 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 DTD = 'dtd' | 94 DTD = 'dtd' |
| 95 | 95 |
| 96 # Other options. | 96 # Other options. |
| 97 MATCH_CASE = 'match-case' | 97 MATCH_CASE = 'match-case' |
| 98 DOMAIN = 'domain' | 98 DOMAIN = 'domain' |
| 99 THIRD_PARTY = 'third-party' | 99 THIRD_PARTY = 'third-party' |
| 100 COLLAPSE = 'collapse' | 100 COLLAPSE = 'collapse' |
| 101 SITEKEY = 'sitekey' | 101 SITEKEY = 'sitekey' |
| 102 DONOTTRACK = 'donottrack' | 102 DONOTTRACK = 'donottrack' |
| 103 CSP = 'csp' | 103 CSP = 'csp' |
| 104 REWRITE = 'rewrite' |
| 104 | 105 |
| 105 | 106 |
| 106 def _line_type(name, field_names, format_string): | 107 def _line_type(name, field_names, format_string): |
| 107 """Define a line type. | 108 """Define a line type. |
| 108 | 109 |
| 109 Parameters | 110 Parameters |
| 110 ---------- | 111 ---------- |
| 111 name: str | 112 name: str |
| 112 The name of the line type to define. | 113 The name of the line type to define. |
| 113 field_names: str or list | 114 field_names: str or list |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 Raises | 314 Raises |
| 314 ------ | 315 ------ |
| 315 ParseError | 316 ParseError |
| 316 Thrown during iteration for invalid filter list lines. | 317 Thrown during iteration for invalid filter list lines. |
| 317 TypeError | 318 TypeError |
| 318 If `lines` is not iterable. | 319 If `lines` is not iterable. |
| 319 | 320 |
| 320 """ | 321 """ |
| 321 for line in lines: | 322 for line in lines: |
| 322 yield parse_line(line) | 323 yield parse_line(line) |
| OLD | NEW |