dataclasses-json
dataclasses-json copied to clipboard
Fix config(exclude=…) type annotations
- The
exclude
callback takes one argument, not two. - Objects of type
Exclude
are not accepted.ALWAYS
andNEVER
have typeCallable
, notExclude
. - Class variables like
Exclude.ALWAYS
,Exclude.NEVER
are not allowed to be generic, and they don’t need to be, sinceCallable[[object], bool]
is convertible toCallable[[T], bool]
.
Apparently I’m not the first to submit this.
- #231
- #336
- #360
hi @andersk could you please update your PR so we can review and merge :)
@george-zubrienko Rebased.