Skip to content

Commit b00f11b

Browse files
committed
style(black): add fmt off tags around parser.add_argument calls
1 parent 1e7319e commit b00f11b

File tree

5 files changed

+25
-58
lines changed

5 files changed

+25
-58
lines changed

src/acquisition/ght/ght_update.py

+5-17
Original file line numberDiff line numberDiff line change
@@ -351,25 +351,13 @@ def get_num_rows():
351351
def main():
352352
# args and usage
353353
parser = argparse.ArgumentParser()
354-
parser.add_argument(
355-
"location",
356-
action="store",
357-
type=str,
358-
default=None,
359-
help="location(s) (ex: all; US; TX; CA,LA,WY)",
360-
)
361-
parser.add_argument(
362-
"term",
363-
action="store",
364-
type=str,
365-
default=None,
366-
help='term/query/topic (ex: all; /m/0cycc; "flu fever")',
367-
)
354+
# fmt: off
355+
parser.add_argument("location", action="store", type=str, default=None, help="location(s) (ex: all; US; TX; CA,LA,WY)")
356+
parser.add_argument("term", action="store", type=str, default=None, help='term/query/topic (ex: all; /m/0cycc; "flu fever")')
368357
parser.add_argument("--first", "-f", default=None, type=int, help="first epiweek override")
369358
parser.add_argument("--last", "-l", default=None, type=int, help="last epiweek override")
370-
parser.add_argument(
371-
"--country", "-c", default="US", type=str, help="location country (ex: US; BR)"
372-
)
359+
parser.add_argument("--country", "-c", default="US", type=str, help="location country (ex: US; BR)")
360+
# fmt: on
373361
args = parser.parse_args()
374362

375363
# sanity check

src/acquisition/ght/google_health_trends.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,10 @@ def get_data(self, start_week, end_week, location, term, resolution="week", coun
114114
def main():
115115
# args and usage
116116
parser = argparse.ArgumentParser()
117-
parser.add_argument("apikey", action="store", type=str, default=None, help="API key")
117+
# fmt: off
118+
parser.add_argument(
119+
"apikey", action="store", type=str, default=None, help="API key"
120+
)
118121
parser.add_argument(
119122
"startweek", action="store", type=int, default=None, help="first week (ex: 201440)"
120123
)
@@ -127,6 +130,7 @@ def main():
127130
parser.add_argument(
128131
"term", action="store", type=str, default=None, help="term/query/topic (ex: /m/0cycc)"
129132
)
133+
# fmt: on
130134
args = parser.parse_args()
131135

132136
# get the data

src/acquisition/quidel/quidel_update.py

+4-10
Original file line numberDiff line numberDiff line change
@@ -124,19 +124,13 @@ def get_num_rows():
124124
def main():
125125
# args and usage
126126
parser = argparse.ArgumentParser()
127-
parser.add_argument(
128-
"--location",
129-
action="store",
130-
type=str,
131-
default=None,
132-
help="location(s) (ex: all; any of hhs1-10)",
133-
)
127+
# fmt: off
128+
parser.add_argument("--location", action="store", type=str, default=None, help="location(s) (ex: all; any of hhs1-10)")
134129
parser.add_argument("--first", "-f", default=None, type=int, help="first epiweek override")
135130
parser.add_argument("--last", "-l", default=None, type=int, help="last epiweek override")
136131
parser.add_argument("--force_update", "-u", action="store_true", help="force update db values")
137-
parser.add_argument(
138-
"--skip_email", "-s", action="store_true", help="skip email downloading step"
139-
)
132+
parser.add_argument("--skip_email", "-s", action="store_true", help="skip email downloading step")
133+
# fmt: on
140134
args = parser.parse_args()
141135

142136
# sanity check

src/acquisition/twtr/healthtweets.py

+6-16
Original file line numberDiff line numberDiff line change
@@ -216,24 +216,14 @@ def _go(self, url, method=None, referer=None, data=None):
216216
def main():
217217
# args and usage
218218
parser = argparse.ArgumentParser()
219+
# fmt: off
219220
parser.add_argument("username", action="store", type=str, help="healthtweets.org username")
220221
parser.add_argument("password", action="store", type=str, help="healthtweets.org password")
221-
parser.add_argument(
222-
"state",
223-
action="store",
224-
type=str,
225-
choices=list(HealthTweets.STATE_CODES.keys()),
226-
help="U.S. state (ex: TX)",
227-
)
228-
parser.add_argument(
229-
"date1", action="store", type=str, help="first date, inclusive (ex: 2015-01-01)"
230-
)
231-
parser.add_argument(
232-
"date2", action="store", type=str, help="last date, inclusive (ex: 2015-01-01)"
233-
)
234-
parser.add_argument(
235-
"-d", "--debug", action="store_const", const=True, default=False, help="enable debug mode"
236-
)
222+
parser.add_argument("state", action="store", type=str, choices=list(HealthTweets.STATE_CODES.keys()), help="U.S. state (ex: TX)")
223+
parser.add_argument("date1", action="store", type=str, help="first date, inclusive (ex: 2015-01-01)")
224+
parser.add_argument("date2", action="store", type=str, help="last date, inclusive (ex: 2015-01-01)")
225+
parser.add_argument("-d", "--debug", action="store_const", const=True, default=False, help="enable debug mode")
226+
# fmt: on
237227
args = parser.parse_args()
238228

239229
ht = HealthTweets(args.username, args.password, debug=args.debug)

src/acquisition/wiki/wiki_download.py

+5-14
Original file line numberDiff line numberDiff line change
@@ -289,23 +289,14 @@ def main():
289289

290290
# args and usage
291291
parser = argparse.ArgumentParser()
292+
# fmt: off
292293
parser.add_argument("secret", type=str, help="hmac secret key")
293-
parser.add_argument(
294-
"-b", "--blimit", action="store", type=int, default=None, help="download limit, in bytes"
295-
)
294+
parser.add_argument("-b", "--blimit", action="store", type=int, default=None, help="download limit, in bytes")
296295
parser.add_argument("-j", "--jlimit", action="store", type=int, default=None, help="job limit")
297-
parser.add_argument(
298-
"-s",
299-
"--sleep",
300-
action="store",
301-
type=int,
302-
default=1,
303-
help="seconds to sleep between each job",
304-
)
296+
parser.add_argument("-s", "--sleep", action="store", type=int, default=1, help="seconds to sleep between each job")
305297
parser.add_argument("-t", "--type", action="store", type=int, default=0, help="type of job")
306-
parser.add_argument(
307-
"-d", "--debug", action="store_const", const=True, default=False, help="enable debug mode"
308-
)
298+
parser.add_argument("-d", "--debug", action="store_const", const=True, default=False, help="enable debug mode")
299+
# fmt: on
309300
args = parser.parse_args()
310301

311302
# runtime options

0 commit comments

Comments
 (0)