Format Prefab import guard

This commit is contained in:
Jeremiah Lowin 2026-08-02 09:42:14 -04:00
commit 0342e6cccd
No known key found for this signature in database

View file

@ -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.")
)