dataclasses-json icon indicating copy to clipboard operation
dataclasses-json copied to clipboard

Fix config(exclude=…) type annotations

Open andersk opened this issue 2 years ago • 1 comments

  • The exclude callback takes one argument, not two.
  • Objects of type Exclude are not accepted. ALWAYS and NEVER have type Callable, not Exclude.
  • Class variables like Exclude.ALWAYS, Exclude.NEVER are not allowed to be generic, and they don’t need to be, since Callable[[object], bool] is convertible to Callable[[T], bool].

andersk avatar Jul 12 '22 22:07 andersk

Apparently I’m not the first to submit this.

  • #231
  • #336
  • #360

andersk avatar Jul 12 '22 23:07 andersk

hi @andersk could you please update your PR so we can review and merge :)

george-zubrienko avatar Jun 30 '23 19:06 george-zubrienko

@george-zubrienko Rebased.

andersk avatar Jul 01 '23 00:07 andersk