mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-20 06:10:34 +08:00
fix Optional[List] in Configurable
Summary: Optional[not_a_type] was causing errors. Reviewed By: davnov134 Differential Revision: D35355530 fbshipit-source-id: e9b52cfd6347ffae0fe688ef30523a4092ccf9fd
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a999fc22ee
commit
2802fd9398
@@ -746,7 +746,8 @@ def _get_type_to_process(type_) -> Optional[Tuple[Type, _ProcessType]]:
|
||||
return
|
||||
underlying = args[0] if args[1] is type(None) else args[1] # noqa: E721
|
||||
if (
|
||||
issubclass(underlying, ReplaceableBase)
|
||||
isinstance(underlying, type)
|
||||
and issubclass(underlying, ReplaceableBase)
|
||||
and ReplaceableBase in underlying.__bases__
|
||||
):
|
||||
return underlying, _ProcessType.OPTIONAL_REPLACEABLE
|
||||
|
||||
Reference in New Issue
Block a user