diff --git a/lenskit/lenskit/pipeline/components.py b/lenskit/lenskit/pipeline/components.py index 46cf08ee6..de7954703 100644 --- a/lenskit/lenskit/pipeline/components.py +++ b/lenskit/lenskit/pipeline/components.py @@ -169,9 +169,9 @@ def __init__(self, config: object | None = None, **kwargs: Any): def _config_class(cls, return_any: bool = False) -> type | None: hints = get_type_hints(cls) ct = hints.get("config", None) - if ct is None or ct == NoneType: + if ct == NoneType: return None - elif ct == Any: + elif ct is None or ct == Any: if return_any: return ct else: