Skip to content

Commit

Permalink
Add explicit casting on click options (#1217)
Browse files Browse the repository at this point in the history
* Add explicit casting on click options

* Change default 20 to 20.0
  • Loading branch information
Kludex authored Oct 11, 2021
1 parent 23fe50f commit fe16ac1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions uvicorn/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
@click.option(
"--ws-ping-interval",
type=float,
default=20,
default=20.0,
help="WebSocket ping interval",
show_default=True,
)
@click.option(
"--ws-ping-timeout",
type=float,
default=20,
default=20.0,
help="WebSocket ping timeout",
show_default=True,
)
Expand Down Expand Up @@ -277,14 +277,14 @@ def print_version(ctx: click.Context, param: click.Parameter, value: bool) -> No
@click.option(
"--ssl-version",
type=int,
default=SSL_PROTOCOL_VERSION,
default=int(SSL_PROTOCOL_VERSION),
help="SSL version to use (see stdlib ssl module's)",
show_default=True,
)
@click.option(
"--ssl-cert-reqs",
type=int,
default=ssl.CERT_NONE,
default=int(ssl.CERT_NONE),
help="Whether client certificate is required (see stdlib ssl module's)",
show_default=True,
)
Expand Down

0 comments on commit fe16ac1

Please sign in to comment.