You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is my understanding that replace_with it so be used with set_parse_action to return an arbitrary object as a parse result. Also, it's own docstring has replace_with(math.nan), with a non-string argument. Finally, set_parse_action accepts a Callable with return type Any.
The current implementation works, but produces errors when type-checking, e.g. with mypy:
error: Argument 1 has incompatible type "dict[Never, Never]"; expected "str" [arg-type]
Proposed solution
I believe replace_with should have an argument of type Any.
The text was updated successfully, but these errors were encountered:
Issue description
replace_with
function is typed as:It is my understanding that
replace_with
it so be used withset_parse_action
to return an arbitrary object as a parse result. Also, it's own docstring hasreplace_with(math.nan)
, with a non-string argument. Finally,set_parse_action
accepts aCallable
with return typeAny
.The current implementation works, but produces errors when type-checking, e.g. with
mypy
:Proposed solution
I believe
replace_with
should have an argument of typeAny
.The text was updated successfully, but these errors were encountered: