Typing: find_index only accepts Callable or None
mawaliya opened this issue · comments
pydash = 7.0.4
python = 3.10.6
The old code of:
data = [{"a": 0, "b": 3},{"a": "1", "c": 5}]
a0 = find_index(data, {"a": 0})
When the type check is on, pylance will complain:
Argument of type "dict[str, str]" cannot be assigned to parameter "predicate" of type "None" in function "find_index"
Expected:
To add the type compatability.
Fix has been released in v7.0.5: https://pypi.org/project/pydash/7.0.5/