mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 07:09:11 +02:00
Format Prefab import guard
This commit is contained in:
parent
5c751510cc
commit
0342e6cccd
1 changed files with 4 additions and 2 deletions
|
|
@ -32,8 +32,10 @@ def _could_be_prefab(value_or_type: Any) -> bool:
|
|||
value_or_type if isinstance(value_or_type, type) else type(value_or_type)
|
||||
)
|
||||
module = getattr(candidate_type, "__module__", "")
|
||||
return "prefab_ui" in sys.modules or module == "prefab_ui" or module.startswith(
|
||||
"prefab_ui."
|
||||
return (
|
||||
"prefab_ui" in sys.modules
|
||||
or module == "prefab_ui"
|
||||
or module.startswith("prefab_ui.")
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue