Skip to content

Commit e1ba490

Browse files
committed
refactor __main__
refactor __main__
1 parent cdf138e commit e1ba490

File tree

4 files changed

+29
-24
lines changed

4 files changed

+29
-24
lines changed

.idea/workspace.xml

+18-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev_setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="je_auto_control_dev",
8-
version="0.0.26",
8+
version="0.0.27",
99
author="JE-Chen",
1010
author_email="zenmailman@gmail.com",
1111
description="auto testing",

je_auto_control/__main__.py

+9-11
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,19 @@
66
from je_auto_control.utils.executor.action_executor import execute_action
77
from je_auto_control.utils.executor.action_executor import execute_files
88

9+
if __name__ == "__main__":
10+
def preprocess_execute_action(file_path: str):
11+
execute_action(read_action_json(file_path))
912

10-
def preprocess_execute_action(file_path: str):
11-
execute_action(read_action_json(file_path))
12-
13-
14-
def preprocess_execute_files(file_path: str):
15-
execute_files(get_dir_files_as_list(file_path))
1613

14+
def preprocess_execute_files(file_path: str):
15+
execute_files(get_dir_files_as_list(file_path))
1716

18-
argparse_event_dict = {
19-
"execute_file": preprocess_execute_action,
20-
"execute_dir": preprocess_execute_files
21-
}
2217

23-
if __name__ == "__main__":
18+
argparse_event_dict = {
19+
"execute_file": preprocess_execute_action,
20+
"execute_dir": preprocess_execute_files
21+
}
2422
parser = argparse.ArgumentParser()
2523
parser.add_argument("-e", "--execute_file", type=str, help="choose action file to execute")
2624
parser.add_argument("-d", "--execute_dir", type=str, help="choose dir include action file to execute")

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setuptools.setup(
77
name="je_auto_control",
8-
version="0.0.93",
8+
version="0.0.94",
99
author="JE-Chen",
1010
author_email="zenmailman@gmail.com",
1111
description="auto testing",

0 commit comments

Comments
 (0)