Fix typos and examples in vscode examples
This commit is contained in:
@@ -33,7 +33,7 @@ def check_json_keybindings(actual: str, expected: str, **options) -> float:
|
||||
break
|
||||
else:
|
||||
return 0.0
|
||||
expected = expected['expect']
|
||||
expected = expected['expected']
|
||||
if expected in data:
|
||||
return 1.0
|
||||
else:
|
||||
@@ -55,7 +55,7 @@ def check_json_settings(actual: str, expected: str, **options) -> float:
|
||||
with open(actual, 'r') as f:
|
||||
data = json.load(f)
|
||||
|
||||
expect = expected['expect']
|
||||
expect = expected['expected']
|
||||
data_copy = copy.deepcopy(data)
|
||||
data_copy.update(expect)
|
||||
if data == data_copy:
|
||||
@@ -93,7 +93,7 @@ def compare_config(actual: str, rules: Dict, **options) -> float:
|
||||
with open(actual) as f1:
|
||||
actual_text = f1.read()
|
||||
|
||||
if actual_text == rules['expect']:
|
||||
if actual_text == rules['expected']:
|
||||
return 1.0
|
||||
return 0.0
|
||||
|
||||
@@ -110,7 +110,7 @@ def compare_answer(actual: str, rules: Dict, **options) -> float:
|
||||
if not actual:
|
||||
return 0.
|
||||
|
||||
if actual == rules['expect']:
|
||||
if actual == rules['expected']:
|
||||
return 1.0
|
||||
|
||||
# TODO: can use text embedding to get non-zero return
|
||||
|
||||
Reference in New Issue
Block a user