Skip to content

Commit 8e612e4

Browse files
committed
Renamed target_path to file_path
1 parent c88005b commit 8e612e4

2 files changed

Lines changed: 6 additions & 6 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def remove_keys(json_dir, keys):
3232

3333
return keys_removed, keys_skipped, files_processed_cnt
3434

35-
def write(target_path, src_data):
36-
os.makedirs(os.path.dirname(target_path), exist_ok=True)
37-
with open(target_path, 'w', encoding='utf-8') as file:
35+
def write(file_path, src_data):
36+
os.makedirs(os.path.dirname(file_path), exist_ok=True)
37+
with open(file_path, 'w', encoding='utf-8') as file:
3838
json.dump(src_data, file, indent=2, ensure_ascii=False)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def read(file_path):
55
with open(file_path, 'r', encoding='utf-8') as file:
66
return json5.load(file)
77

8-
def write(target_path, src_data):
9-
os.makedirs(os.path.dirname(target_path), exist_ok=True)
10-
with open(target_path, 'w', encoding='utf-8') as file:
8+
def write(file_path, src_data):
9+
os.makedirs(os.path.dirname(file_path), exist_ok=True)
10+
with open(file_path, 'w', encoding='utf-8') as file:
1111
json.dump(src_data, file, indent=2, ensure_ascii=False)

0 commit comments

Comments
 (0)