Compatibility with older typer versions (#2117)

This commit is contained in:
Masen Furer 2023-11-02 11:28:37 -07:00 committed by GitHub
parent 1ceaedbd15
commit fbedc9447e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,11 @@ from reflex.utils import (
typer.core.rich = False # type: ignore
# Create the app.
cli = typer.Typer(add_completion=False, pretty_exceptions_enable=False)
try:
cli = typer.Typer(add_completion=False, pretty_exceptions_enable=False)
except TypeError:
# Fallback for older typer versions.
cli = typer.Typer(add_completion=False)
# Get the config.
config = get_config()