prefpicker 1.20.0__tar.gz → 1.22.0__tar.gz
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-1.20.0 → prefpicker-1.22.0}/PKG-INFO +1 -1
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/prefpicker.py +7 -4
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/templates/browser-fuzzing.yml +8 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/PKG-INFO +1 -1
- {prefpicker-1.20.0 → prefpicker-1.22.0}/.codecov.yml +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/.github/CODEOWNERS +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/.github/workflows/prefmonitor.yml +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/.gitignore +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/.pre-commit-config.yaml +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/.taskcluster.yml +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/CODE_OF_CONDUCT.md +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/LICENSE +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/MANIFEST.in +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/README.md +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/pyproject.toml +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/setup.cfg +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/setup.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/__init__.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/__main__.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/main.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/py.typed +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/templates/schema.json +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/test_main.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/test_prefpicker.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker/test_templates.py +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/SOURCES.txt +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/dependency_links.txt +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/entry_points.txt +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/not-zip-safe +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/requires.txt +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/src/prefpicker.egg-info/top_level.txt +0 -0
- {prefpicker-1.20.0 → prefpicker-1.22.0}/tox.ini +0 -0
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
4
4
|
"""prefpicker module"""
|
|
5
5
|
|
|
6
|
-
from datetime import datetime
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
7
|
from importlib.metadata import PackageNotFoundError, version
|
|
8
|
+
from json import dumps
|
|
8
9
|
from pathlib import Path
|
|
9
10
|
from random import choice
|
|
10
11
|
from typing import Any, Dict, Iterator, List, Optional, Set, Tuple, Union
|
|
@@ -105,7 +106,7 @@ class PrefPicker: # pylint: disable=missing-docstring
|
|
|
105
106
|
"""
|
|
106
107
|
with dest.open("w") as prefs_fp:
|
|
107
108
|
prefs_fp.write(f"// Generated with PrefPicker ({__version__}) @ ")
|
|
108
|
-
prefs_fp.write(datetime.
|
|
109
|
+
prefs_fp.write(datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S %Z"))
|
|
109
110
|
prefs_fp.write(f"\n// Variant {variant!r}\n")
|
|
110
111
|
for pref, keys in sorted(self.prefs.items()):
|
|
111
112
|
variants = keys["variants"]
|
|
@@ -119,11 +120,13 @@ class PrefPicker: # pylint: disable=missing-docstring
|
|
|
119
120
|
value = choice(options)
|
|
120
121
|
if value is None:
|
|
121
122
|
if len(options) > 1:
|
|
122
|
-
prefs_fp.write(
|
|
123
|
+
prefs_fp.write(
|
|
124
|
+
f"// '{pref}' skipped, options {dumps(options)}\n"
|
|
125
|
+
)
|
|
123
126
|
# skipping pref
|
|
124
127
|
continue
|
|
125
128
|
if len(options) > 1:
|
|
126
|
-
prefs_fp.write(f"// '{pref}'
|
|
129
|
+
prefs_fp.write(f"// '{pref}' options {dumps(options)}\n")
|
|
127
130
|
# sanitize value for writing
|
|
128
131
|
if isinstance(value, bool):
|
|
129
132
|
sanitized = "true" if value else "false"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|