Skip to content

Commit 3748d8c

Browse files
philippottobulldozer-boy[bot]
authored andcommitted
Turn main cubing code into a function which can be imported (#129)
* turn main cubing code into a function which can be imported * format * Merge branch 'master' into main-cubing-function
1 parent 54d4f39 commit 3748d8c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

wkcuber/__main__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ def create_parser():
3636
return parser
3737

3838

39-
if __name__ == "__main__":
40-
args = create_parser().parse_args()
39+
def main(args):
4140
setup_logging(args)
4241

4342
scale = tuple(float(x) for x in args.scale.split(","))
@@ -87,3 +86,8 @@ def create_parser():
8786
)
8887

8988
refresh_metadata(args.target_path)
89+
90+
91+
if __name__ == "__main__":
92+
parsed_args = create_parser().parse_args()
93+
main(parsed_args)

0 commit comments

Comments
 (0)