Skip to content

Commit

Permalink
Ensure consistency in naming conventions across JSON keys
Browse files Browse the repository at this point in the history
# Whilst we're not using the camelCase usually used for JSON, the least we
# could do would be to consistently use snake_case!
  • Loading branch information
jsharkey13 committed Oct 17, 2018
1 parent 53c9109 commit c216c8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ which will get a response like:
{
"equal": "true",
"equality_type": "exact",
"parsedTarget": "x + 3",
"parsedTest": "x + 3",
"parsed_target": "x + 3",
"parsed_test": "x + 3",
"target": "x + 3",
"test": "3 + x"
}
Expand Down
8 changes: 4 additions & 4 deletions checker/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,8 +513,8 @@ def plus_minus_checker(test_str, target_str, symbols=None, check_symbols=True):
return dict(
target=target_str,
test=test_str,
parsedTarget=plus["parsedTarget"],
parsedTest=plus["parsedTest"],
parsed_target=plus["parsed_target"],
parsed_test=plus["parsed_test"],
equal=str(equal).lower(),
equality_type=equality_type,
)
Expand Down Expand Up @@ -608,8 +608,8 @@ def check(test_str, target_str, symbols=None, check_symbols=True, description=No
result["error"] = "Parsing Test Expression Failed!"
return result

result["parsedTarget"] = str(target_expr)
result["parsedTest"] = str(test_expr)
result["parsed_target"] = str(target_expr)
result["parsed_test"] = str(test_expr)

# Now check for symbol match and equality:
try:
Expand Down

0 comments on commit c216c8e

Please sign in to comment.