Skip to content

Commit

Permalink
Allow floating point --delay values
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Apr 9, 2024
1 parent fda9582 commit f17b2ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sphinx_autobuild/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def _add_autobuild_arguments(parser):
group.add_argument(
"--delay",
dest="delay",
type=int,
type=float,
default=5,
help="how long to wait before opening the browser",
)
Expand Down
2 changes: 1 addition & 1 deletion sphinx_autobuild/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def find_free_port():
return s.getsockname()[1]


def open_browser(url_host: str, delay: int) -> None:
def open_browser(url_host: str, delay: float) -> None:
def _opener():
time.sleep(delay)
webbrowser.open(f"http://{url_host}")
Expand Down

0 comments on commit f17b2ab

Please sign in to comment.