Skip to content

Commit e69cf12

Browse files
committed
update docstrings/comments and order options based on invocation
1 parent 0e964e9 commit e69cf12

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

scripts/1-fetch/gcs_fetch.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22
"""
3-
This file is dedicated to querying data from the Google Custom Search API.
3+
Fetch CC Legal Tool usage data from Google Custom Search (GCS) API.
44
"""
55
# Standard library
66
import argparse
@@ -53,30 +53,30 @@
5353

5454
def parse_arguments():
5555
"""
56-
Parses command-line arguments, returns parsed arguments.
56+
Parse command-line options, returns parsed argument namespace.
5757
"""
58-
LOGGER.info("Parsing command-line arguments")
59-
parser = argparse.ArgumentParser(description="Google Custom Search Script")
58+
LOGGER.info("Parsing command-line options")
59+
parser = argparse.ArgumentParser(description=__doc__)
6060
parser.add_argument(
61-
"--dev",
61+
"--limit",
62+
type=int,
63+
default=1,
64+
help="Limit queries (default: 1)",
65+
)
66+
parser.add_argument(
67+
"--enable-save",
6268
action="store_true",
63-
help="Development mode: avoid hitting API (generates fake data)",
69+
help="Enable saving results",
6470
)
6571
parser.add_argument(
6672
"--enable-git",
6773
action="store_true",
6874
help="Enable git actions (fetch, merge, add, commit, and push)",
6975
)
7076
parser.add_argument(
71-
"--enable-save",
77+
"--dev",
7278
action="store_true",
73-
help="Enable saving results",
74-
)
75-
parser.add_argument(
76-
"--limit",
77-
type=int,
78-
default=1,
79-
help="Limit queries (default: 1)",
79+
help="Development mode: avoid hitting API (generate fake data)",
8080
)
8181
return parser.parse_args()
8282

0 commit comments

Comments
 (0)