mirror of
https://github.com/zen-browser/desktop.git
synced 2025-12-12 09:32:36 +00:00
chore: Implement settings dump schema to update firefox remote servic…, p=#11579
* chore: Implement settings dump schema to update firefox remote services data, b=no-bug, c=configs, scripts * feat: Also update with timestamps, b=no-bug, c=configs, scripts * chore: Move JSON with comments to a new module, b=no-bug, c=scripts, tests --------- Signed-off-by: mr. m <91018726+mr-cheffy@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import sys
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from json_with_comments import JSONWithCommentsDecoder
|
||||
|
||||
IGNORE_PREFS_FILE_IN = os.path.join(
|
||||
'src', 'zen', 'tests', 'ignorePrefs.json'
|
||||
@@ -16,15 +17,6 @@ IGNORE_PREFS_FILE_OUT = os.path.join(
|
||||
)
|
||||
|
||||
|
||||
class JSONWithCommentsDecoder(json.JSONDecoder):
|
||||
def __init__(self, **kw):
|
||||
super().__init__(**kw)
|
||||
|
||||
def decode(self, s: str) -> Any:
|
||||
s = '\n'.join(l for l in s.split('\n') if not l.lstrip(' ').startswith('//'))
|
||||
return super().decode(s)
|
||||
|
||||
|
||||
def copy_ignore_prefs():
|
||||
print("Copying ignorePrefs.json from src/zen/tests to engine/testing/mochitest...")
|
||||
# if there are prefs that dont exist on output file, copy them from input file
|
||||
|
||||
Reference in New Issue
Block a user