Skip to content

Commit 63284bd

Browse files
committed
Stripped trailing period from ValueError
1 parent 1ef0e6d commit 63284bd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • remove-json-keys/src/remove_json_keys/lib/data
  • translate-messages/src/translate_messages/lib/data

remove-json-keys/src/remove_json_keys/lib/data/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def is_valid(file_path, format='json'):
1919
try : json5.loads(file_text) ; return True
2020
except Exception : return False
2121
else:
22-
raise ValueError(f"Unsupported format '{format}'. Expected 'json' or 'json5'.")
22+
raise ValueError(f"Unsupported format '{format}'. Expected 'json' or 'json5'")
2323

2424
def read(file_path, encoding='utf-8'):
2525
with open(file_path, 'r', encoding=encoding) as file:

translate-messages/src/translate_messages/lib/data/json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def is_valid(file_path, format='json'):
1717
try : json5.loads(file_text) ; return True
1818
except Exception : return False
1919
else:
20-
raise ValueError(f"Unsupported format '{format}'. Expected 'json' or 'json5'.")
20+
raise ValueError(f"Unsupported format '{format}'. Expected 'json' or 'json5'")
2121

2222
def read(file_path, encoding='utf-8'):
2323
with open(file_path, 'r', encoding=encoding) as file:

0 commit comments

Comments
 (0)