-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Expand file tree
/
Copy pathupdatejs.py
More file actions
32 lines (22 loc) · 693 Bytes
/
updatejs.py
File metadata and controls
32 lines (22 loc) · 693 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""Check code."""
import argparse
from pathlib import Path
import utils
def main():
"""Main driver."""
args = parse_args()
codedir = utils.select_code_directory(args)
if args.dev:
utils.update_plotlyjs_dev(codedir)
else:
version = utils.plotly_js_version()
print(version)
utils.update_plotlyjs(version, codedir)
def parse_args():
"""Parse command-line arguments."""
parser = argparse.ArgumentParser()
parser.add_argument("--dev", action="store_true", help="development version")
parser.add_argument("--codedir", type=Path, help="code directory")
return parser.parse_args()
if __name__ == "__main__":
main()