浏览代码

check for typer main (#5198)

* check for typer main

* what
Khaleel Al-Adhami 2 周之前
父节点
当前提交
a24f08fb5d
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      reflex/reflex.py

+ 1 - 1
reflex/reflex.py

@@ -712,7 +712,7 @@ def _convert_reflex_loglevel_to_reflex_cli_loglevel(
     return HostingLogLevel.INFO
     return HostingLogLevel.INFO
 
 
 
 
-if find_spec("typer"):
+if find_spec("typer") and find_spec("typer.main"):
     import typer  # pyright: ignore[reportMissingImports]
     import typer  # pyright: ignore[reportMissingImports]
 
 
     if isinstance(hosting_cli, typer.Typer):
     if isinstance(hosting_cli, typer.Typer):