Skip to content

Commit 56d4ca6

Browse files
author
MomIsBestFriend
committed
STY: f-strings
1 parent 91ad4fd commit 56d4ca6

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

doc/make.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def _run_os(*args):
111111
"""
112112
subprocess.check_call(args, stdout=sys.stdout, stderr=sys.stderr)
113113

114-
def _sphinx_build(self, kind):
114+
def _sphinx_build(self, kind: str):
115115
"""
116116
Call sphinx to build documentation.
117117
@@ -284,23 +284,20 @@ def zip_html(self):
284284
def main():
285285
cmds = [method for method in dir(DocBuilder) if not method.startswith("_")]
286286

287-
joined = ",".join(cmds)
288-
joined_epilog = f"Commands: {joined}"
289-
290-
joined_cmds = ", ".join(cmds)
291-
287+
joined = ",".joined(cmds)
292288
argparser = argparse.ArgumentParser(
293-
description="pandas documentation builder", epilog=joined_epilog,
289+
description="pandas documentation builder", epilog=f"Commands: {joined}",
294290
)
295291

292+
joined = ", ".join(cmds)
296293
argparser.add_argument(
297-
"command", nargs="?", default="html", help=f"command to run: {joined_cmds}",
294+
"command", nargs="?", default="html", help=f"command to run: {joined}",
298295
)
299296
argparser.add_argument(
300297
"--num-jobs", type=int, default=0, help="number of jobs used by sphinx-build"
301298
)
302299
argparser.add_argument(
303-
"--no-api", default=False, action="store_true", help="omit api and autosummary"
300+
"--no-api", default=False, help="omit api and autosummary", action="store_true"
304301
)
305302
argparser.add_argument(
306303
"--single",
@@ -321,7 +318,10 @@ def main():
321318
action="count",
322319
dest="verbosity",
323320
default=0,
324-
help="increase verbosity (can be repeated), passed to the sphinx build command",
321+
help=(
322+
"increase verbosity (can be repeated), "
323+
"passed to the sphinx build command"
324+
),
325325
)
326326
argparser.add_argument(
327327
"--warnings-are-errors",

0 commit comments

Comments
 (0)