Skip to content

Commit 241634a

Browse files
committed
Made review changes
1 parent 7eba804 commit 241634a

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

scripts/2-process/gcs_process.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,12 @@ def parse_arguments():
7373
return args
7474

7575

76-
def check_for_data_files(file_path):
77-
if os.path.exists(file_path):
78-
raise shared.QuantifyingException(
79-
f"Processed data already exists for {QUARTER}", 0
80-
)
76+
def check_for_data_files(file_paths):
77+
for path in file_paths:
78+
if os.path.exists(path):
79+
raise shared.QuantifyingException(
80+
f"Processed data already exists for {QUARTER}", 0
81+
)
8182

8283

8384
def data_to_csv(args, data, file_path):

scripts/2-process/github_process.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,12 @@ def parse_arguments():
6363
return args
6464

6565

66-
def check_for_data_files(file_path):
67-
if os.path.exists(file_path):
68-
raise shared.QuantifyingException(
69-
f"Processed data already exists for {QUARTER}", 0
70-
)
66+
def check_for_data_files(file_paths):
67+
for path in file_paths:
68+
if os.path.exists(path):
69+
raise shared.QuantifyingException(
70+
f"Processed data already exists for {QUARTER}", 0
71+
)
7172

7273

7374
def data_to_csv(args, data, file_path):

scripts/2-process/wikipedia_process.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,12 @@ def parse_arguments():
7474
return args
7575

7676

77-
def check_for_data_files(file_path):
78-
if os.path.exists(file_path):
79-
raise shared.QuantifyingException(
80-
f"Processed data already exists for {QUARTER}", 0
81-
)
77+
def check_for_data_files(file_paths):
78+
for path in file_paths:
79+
if os.path.exists(path):
80+
raise shared.QuantifyingException(
81+
f"Processed data already exists for {QUARTER}", 0
82+
)
8283

8384

8485
def data_to_csv(args, data, file_path):

0 commit comments

Comments
 (0)