Skip to content

Commit

Permalink
refine any/none config class logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mdekstrand committed Jan 14, 2025
1 parent dec445c commit 90eba72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lenskit/lenskit/pipeline/components.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 90eba72

Please sign in to comment.