Skip to content

Commit

Permalink
Turn main cubing code into a function which can be imported (#129)
Browse files Browse the repository at this point in the history
* turn main cubing code into a function which can be imported
* format
* Merge branch 'master' into main-cubing-function
  • Loading branch information
philippotto authored and bulldozer-boy[bot] committed Sep 13, 2019
1 parent 54d4f39 commit 3748d8c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wkcuber/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ def create_parser():
return parser


if __name__ == "__main__":
args = create_parser().parse_args()
def main(args):
setup_logging(args)

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

refresh_metadata(args.target_path)


if __name__ == "__main__":
parsed_args = create_parser().parse_args()
main(parsed_args)

0 comments on commit 3748d8c

Please sign in to comment.