Skip to content

Commit 9ea2418

Browse files
committed
store_true instead of BooleanOptionalAction
1 parent 2fed18b commit 9ea2418

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

dash/_cli.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,35 +82,33 @@ def create_parser() -> argparse.ArgumentParser:
8282
help='Proxy configuration string, e.g., "http://0.0.0.0:8050::https://my.domain.com".',
8383
)
8484

85-
# Debug flag (supports --debug and --no-debug)
86-
# Note: Requires Python 3.9+
8785
run_parser.add_argument(
8886
"--debug",
8987
"-d",
90-
action=argparse.BooleanOptionalAction,
88+
action="store_true",
9189
help="Enable/disable Flask debug mode and dev tools.",
9290
)
9391

9492
# Dev Tools options
9593
dev_tools_group = run_parser.add_argument_group("dev tools options")
9694
dev_tools_group.add_argument(
9795
"--dev-tools-ui",
98-
action=argparse.BooleanOptionalAction,
96+
action="store_true",
9997
help="Enable/disable the dev tools UI.",
10098
)
10199
dev_tools_group.add_argument(
102100
"--dev-tools-props-check",
103-
action=argparse.BooleanOptionalAction,
101+
action="store_true",
104102
help="Enable/disable component prop validation.",
105103
)
106104
dev_tools_group.add_argument(
107105
"--dev-tools-serve-dev-bundles",
108-
action=argparse.BooleanOptionalAction,
106+
action="store_true",
109107
help="Enable/disable serving of dev bundles.",
110108
)
111109
dev_tools_group.add_argument(
112110
"--dev-tools-hot-reload",
113-
action=argparse.BooleanOptionalAction,
111+
action="store_true",
114112
help="Enable/disable hot reloading.",
115113
)
116114
dev_tools_group.add_argument(
@@ -130,17 +128,17 @@ def create_parser() -> argparse.ArgumentParser:
130128
)
131129
dev_tools_group.add_argument(
132130
"--dev-tools-silence-routes-logging",
133-
action=argparse.BooleanOptionalAction,
131+
action="store_true",
134132
help="Enable/disable silencing of Werkzeug's route logging.",
135133
)
136134
dev_tools_group.add_argument(
137135
"--dev-tools-disable-version-check",
138-
action=argparse.BooleanOptionalAction,
136+
action="store_true",
139137
help="Enable/disable the Dash version upgrade check.",
140138
)
141139
dev_tools_group.add_argument(
142140
"--dev-tools-prune-errors",
143-
action=argparse.BooleanOptionalAction,
141+
action="store_true",
144142
help="Enable/disable pruning of tracebacks to user code only.",
145143
)
146144

0 commit comments

Comments
 (0)