Skip to content

fix marshmallow warning#564

Open
Panmax wants to merge 3 commits into
lidatong:masterfrom
Panmax:master
Open

fix marshmallow warning#564
Panmax wants to merge 3 commits into
lidatong:masterfrom
Panmax:master

Conversation

@Panmax

@Panmax Panmax commented Jul 12, 2025

Copy link
Copy Markdown

Fixed two wanrings in marshmallow:

  • Passing field metadata as keyword arguments is deprecated. Use the explicit metadata=... argument instead.
  • The 'default' argument to fields is deprecated. Use 'dump_default' instead.

Panmax and others added 3 commits July 12, 2025 10:20
…e LetterCase

The dataclass_json decorator passes letter_case through to config(),
which already accepts Union[Callable[[str], str], LetterCase, None].
However, the decorator's own type annotation only accepted LetterCase.
Pyright resolves LetterCase enum members (whose values are functions
like camelcase) to their value type rather than the enum type, causing
a type error at the call site. This change aligns the annotation with
config()'s signature, fixing compatibility with Pyright.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant