You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: shiny/_main.py
+12-35Lines changed: 12 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,6 @@
2
2
importimportlib
3
3
importimportlib.util
4
4
importos
5
-
importre
6
5
importshutil
7
6
importsys
8
7
importtypes
@@ -59,9 +58,9 @@ def main() -> None:
59
58
)
60
59
@click.option(
61
60
"--autoreload-port",
62
-
type=str,
63
-
default="+123",
64
-
help="Bind autoreload socket to this port number. If the value begins with + or -, it will be added to the value of --port. Ignored if --reload is not used.",
61
+
type=int,
62
+
default=0,
63
+
help="Bind autoreload socket to this port. If 0, a random port will be used. Ignored if --reload is not used.",
65
64
show_default=True,
66
65
)
67
66
@click.option(
@@ -108,7 +107,7 @@ def run(
108
107
app: Union[str, shiny.App],
109
108
host: str,
110
109
port: int,
111
-
autoreload_port: str,
110
+
autoreload_port: int,
112
111
debug: bool,
113
112
reload: bool,
114
113
ws_max_size: int,
@@ -136,7 +135,7 @@ def run_app(
136
135
app: Union[str, shiny.App] ="app:app",
137
136
host: str="127.0.0.1",
138
137
port: int=8000,
139
-
autoreload_port: str="",
138
+
autoreload_port: int=0,
140
139
debug: bool=False,
141
140
reload: bool=False,
142
141
ws_max_size: int=16777216,
@@ -165,11 +164,7 @@ def run_app(
165
164
The port that the app should listen on. Set to 0 to use a random port.
166
165
autoreload_port
167
166
The port that should be used for an additional websocket that is used to support
168
-
hot-reload; ignored if ``reload`` is False. If the value begins with ``"+"`` or
169
-
``"-"``, it will be added to the value of ``port`` (unless ``port`` is 0, in
170
-
which case, ``autoreload_port`` will also be chosen at random). If 0, a random
171
-
port number will be used. If any other numeric value, that port number will be
0 commit comments