prefpicker 2.7.0__py3-none-any.whl → 2.9.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of prefpicker might be problematic. Click here for more details.
- prefpicker/main.py +1 -0
- prefpicker/prefpicker.py +6 -5
- prefpicker/templates/browser-fuzzing.yml +6 -0
- prefpicker/templates/schema.json +19 -6
- {prefpicker-2.7.0.dist-info → prefpicker-2.9.0.dist-info}/METADATA +4 -3
- prefpicker-2.9.0.dist-info/RECORD +16 -0
- {prefpicker-2.7.0.dist-info → prefpicker-2.9.0.dist-info}/WHEEL +1 -1
- prefpicker-2.7.0.dist-info/RECORD +0 -16
- {prefpicker-2.7.0.dist-info → prefpicker-2.9.0.dist-info}/entry_points.txt +0 -0
- {prefpicker-2.7.0.dist-info → prefpicker-2.9.0.dist-info/licenses}/LICENSE +0 -0
- {prefpicker-2.7.0.dist-info → prefpicker-2.9.0.dist-info}/top_level.txt +0 -0
prefpicker/main.py
CHANGED
prefpicker/prefpicker.py
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
4
4
|
"""prefpicker module"""
|
|
5
|
+
|
|
5
6
|
from __future__ import annotations
|
|
6
7
|
|
|
7
8
|
from datetime import datetime, timezone
|
|
@@ -16,7 +17,7 @@ from yaml.parser import ParserError
|
|
|
16
17
|
from yaml.scanner import ScannerError
|
|
17
18
|
|
|
18
19
|
if TYPE_CHECKING:
|
|
19
|
-
from collections.abc import
|
|
20
|
+
from collections.abc import Generator
|
|
20
21
|
|
|
21
22
|
__author__ = "Tyson Smith"
|
|
22
23
|
__credits__ = ["Tyson Smith"]
|
|
@@ -43,7 +44,7 @@ class PrefPicker: # pylint: disable=missing-docstring
|
|
|
43
44
|
self.prefs: dict[str, dict[str, PrefVariant]] = {}
|
|
44
45
|
self.variants: set[str] = {"default"}
|
|
45
46
|
|
|
46
|
-
def check_combinations(self) ->
|
|
47
|
+
def check_combinations(self) -> Generator[tuple[str, int]]:
|
|
47
48
|
"""Count the number of combinations for each variation. Only return
|
|
48
49
|
variants that have more than one combination.
|
|
49
50
|
|
|
@@ -65,7 +66,7 @@ class PrefPicker: # pylint: disable=missing-docstring
|
|
|
65
66
|
if count > 1:
|
|
66
67
|
yield (variant, count)
|
|
67
68
|
|
|
68
|
-
def check_duplicates(self) ->
|
|
69
|
+
def check_duplicates(self) -> Generator[tuple[str, str]]:
|
|
69
70
|
"""Look for variants with values that appear more than once per variant.
|
|
70
71
|
|
|
71
72
|
Args:
|
|
@@ -80,7 +81,7 @@ class PrefPicker: # pylint: disable=missing-docstring
|
|
|
80
81
|
if len(variants[variant]) != len(set(variants[variant])):
|
|
81
82
|
yield (pref, variant)
|
|
82
83
|
|
|
83
|
-
def check_overwrites(self) ->
|
|
84
|
+
def check_overwrites(self) -> Generator[tuple[str, str, PrefValue]]:
|
|
84
85
|
"""Look for variants that overwrite the default with the same value.
|
|
85
86
|
|
|
86
87
|
Args:
|
|
@@ -187,7 +188,7 @@ class PrefPicker: # pylint: disable=missing-docstring
|
|
|
187
188
|
return picker
|
|
188
189
|
|
|
189
190
|
@staticmethod
|
|
190
|
-
def templates() ->
|
|
191
|
+
def templates() -> Generator[Path]:
|
|
191
192
|
"""Available YAML template files.
|
|
192
193
|
|
|
193
194
|
Args:
|
prefpicker/templates/schema.json
CHANGED
|
@@ -6,26 +6,39 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"pref": {
|
|
8
8
|
"type": "object",
|
|
9
|
+
"additionalProperties": false,
|
|
9
10
|
"patternProperties": {
|
|
10
|
-
"
|
|
11
|
+
"^.+$": {
|
|
11
12
|
"additionalProperties": false,
|
|
12
13
|
"type": "object",
|
|
13
14
|
"properties": {
|
|
14
15
|
"variants": {
|
|
15
16
|
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
16
18
|
"patternProperties": {
|
|
17
|
-
"
|
|
18
|
-
"type": "array"
|
|
19
|
+
"^.+$": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"minItems": 1,
|
|
22
|
+
"items": {
|
|
23
|
+
"type": ["boolean", "integer", "null", "string"]
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
|
-
}
|
|
26
|
+
},
|
|
27
|
+
"required": [
|
|
28
|
+
"default"
|
|
29
|
+
]
|
|
21
30
|
},
|
|
22
31
|
"review_on_close": {
|
|
23
32
|
"type": "array",
|
|
33
|
+
"minItems": 1,
|
|
24
34
|
"items": {
|
|
25
|
-
"type": "
|
|
35
|
+
"type": "integer"
|
|
26
36
|
}
|
|
27
37
|
}
|
|
28
|
-
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"variants"
|
|
41
|
+
]
|
|
29
42
|
}
|
|
30
43
|
}
|
|
31
44
|
},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: prefpicker
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.9.0
|
|
4
4
|
Summary: PrefPicker - Manage & generate prefs.js files
|
|
5
5
|
Home-page: https://github.com/MozillaSecurity/prefpicker
|
|
6
6
|
Author: Tyson Smith
|
|
@@ -19,10 +19,11 @@ Requires-Dist: PyYAML
|
|
|
19
19
|
Provides-Extra: dev
|
|
20
20
|
Requires-Dist: pre-commit; extra == "dev"
|
|
21
21
|
Requires-Dist: tox; extra == "dev"
|
|
22
|
+
Dynamic: license-file
|
|
22
23
|
|
|
23
24
|
PrefPicker
|
|
24
25
|
==========
|
|
25
|
-
[](https://github.com/MozillaSecurity/prefpicker/actions/workflows/ci.yml)
|
|
26
27
|
[](https://codecov.io/gh/MozillaSecurity/prefpicker)
|
|
27
28
|
[](https://matrix.to/#/#fuzzing:mozilla.org)
|
|
28
29
|
[](https://pypi.org/project/prefpicker)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
prefpicker/__init__.py,sha256=XWsqb0fPEcXI12OFAGU0ftCAiUAnNTyyAzADC62x1-g,348
|
|
2
|
+
prefpicker/__main__.py,sha256=8-D6LzRgVF2PwY7XXs1Fs-Nzy0NPOl04DKMmk18SqsU,282
|
|
3
|
+
prefpicker/main.py,sha256=V10iJ6UiNc5aACflJSHjJl59kc6f1uJhuSfRFkrsJqw,3842
|
|
4
|
+
prefpicker/prefpicker.py,sha256=kDURIQ0Yvea1lvp3_A67AvZOZU-XSrZbDokvK3ZnZ3E,9870
|
|
5
|
+
prefpicker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
prefpicker/test_main.py,sha256=6K4eKDvXwy7ogdj-tOKIfjCJjr0CnQwfFyobjpj4hgk,2644
|
|
7
|
+
prefpicker/test_prefpicker.py,sha256=ag16_Stw_dsMYyPIsg-TU_TFHHLOirO1aSiBd633oO0,9265
|
|
8
|
+
prefpicker/test_templates.py,sha256=jlu3QTWzn1iE_7ljQs3byBAvUaGjeFZPNuBySSvSUoM,1496
|
|
9
|
+
prefpicker/templates/browser-fuzzing.yml,sha256=9eonjXmiVSCe6uhtWJUmPiG00CDFP97YX9moPAm12aw,23046
|
|
10
|
+
prefpicker/templates/schema.json,sha256=D14picYNGMXV0WObBxeZFb7l_U_OJkZIi29Rv25M2nA,1293
|
|
11
|
+
prefpicker-2.9.0.dist-info/licenses/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
12
|
+
prefpicker-2.9.0.dist-info/METADATA,sha256=0hxrA4qQzsc7OujpLPnfropuN_RKDU8067FH_Z5spy0,4947
|
|
13
|
+
prefpicker-2.9.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
14
|
+
prefpicker-2.9.0.dist-info/entry_points.txt,sha256=og57vebqGVtgg_OZGO39WUb13H8wMzcnNBh4h-t26K0,52
|
|
15
|
+
prefpicker-2.9.0.dist-info/top_level.txt,sha256=H-QqR-VZXNwG4ya7wnqx5NA-yua6D9uQuBquP2zCRbc,11
|
|
16
|
+
prefpicker-2.9.0.dist-info/RECORD,,
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
prefpicker/__init__.py,sha256=XWsqb0fPEcXI12OFAGU0ftCAiUAnNTyyAzADC62x1-g,348
|
|
2
|
-
prefpicker/__main__.py,sha256=8-D6LzRgVF2PwY7XXs1Fs-Nzy0NPOl04DKMmk18SqsU,282
|
|
3
|
-
prefpicker/main.py,sha256=LYFyGmvJKRJauFI5PzEx41ajwi-gNmtdkvyONAl4ff4,3841
|
|
4
|
-
prefpicker/prefpicker.py,sha256=pif71pDYV-ZNmYFLK7DZhlWiOuKjNS0BZ9805eUuerw,9864
|
|
5
|
-
prefpicker/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
prefpicker/test_main.py,sha256=6K4eKDvXwy7ogdj-tOKIfjCJjr0CnQwfFyobjpj4hgk,2644
|
|
7
|
-
prefpicker/test_prefpicker.py,sha256=ag16_Stw_dsMYyPIsg-TU_TFHHLOirO1aSiBd633oO0,9265
|
|
8
|
-
prefpicker/test_templates.py,sha256=jlu3QTWzn1iE_7ljQs3byBAvUaGjeFZPNuBySSvSUoM,1496
|
|
9
|
-
prefpicker/templates/browser-fuzzing.yml,sha256=2Ts8riqQh477a5KTAphkRkFxAPBdzuulDM1QI-7J1Xk,22935
|
|
10
|
-
prefpicker/templates/schema.json,sha256=4WJVuGrxSQHk2CrT5QOZ7SRnTPgK2Dxr4e4LYOmMWyo,898
|
|
11
|
-
prefpicker-2.7.0.dist-info/LICENSE,sha256=HyVuytGSiAUQ6ErWBHTqt1iSGHhLmlC8fO7jTCuR8dU,16725
|
|
12
|
-
prefpicker-2.7.0.dist-info/METADATA,sha256=GXdtXyrcKNDMLTwH_OVQgi5tLnTNCwOoUjTFMpNkQUg,5001
|
|
13
|
-
prefpicker-2.7.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
14
|
-
prefpicker-2.7.0.dist-info/entry_points.txt,sha256=og57vebqGVtgg_OZGO39WUb13H8wMzcnNBh4h-t26K0,52
|
|
15
|
-
prefpicker-2.7.0.dist-info/top_level.txt,sha256=H-QqR-VZXNwG4ya7wnqx5NA-yua6D9uQuBquP2zCRbc,11
|
|
16
|
-
prefpicker-2.7.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|