Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ec7c557

Browse files
committed
Add __name__ == main wrapper around command line arg parsing
1 parent ca9aa0a commit ec7c557

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/python/plotly/commands.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,9 +299,9 @@ def update_plotlyjs_dev():
299299
update_schema_bundle_from_master()
300300
run_codegen()
301301

302-
303-
if "updateplotlyjsdev" in sys.argv:
304-
update_plotlyjs_dev()
305-
elif "updateplotlyjs" in sys.argv:
306-
print(plotly_js_version())
307-
update_plotlyjs(plotly_js_version())
302+
if __name__ == "__main__":
303+
if "updateplotlyjsdev" in sys.argv:
304+
update_plotlyjs_dev()
305+
elif "updateplotlyjs" in sys.argv:
306+
print(plotly_js_version())
307+
update_plotlyjs(plotly_js_version())

0 commit comments

Comments
 (0)