Skip to content

Typed **kwargs on field constructors#2218

Open
vlakius wants to merge 8 commits into
tortoise:developfrom
vlakius:develop
Open

Typed **kwargs on field constructors#2218
vlakius wants to merge 8 commits into
tortoise:developfrom
vlakius:develop

Conversation

@vlakius

@vlakius vlakius commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Added PEP 692 Unpack[TypedDict] typing to field constructors. **kwargs: Any no longer hides common field args from IDEs/type-checkers.

Motivation and Context

See issue: #2168

How Has This Been Tested?

Checked with MyPy and PyRight and my IDE.
tried to add a typo (es: defualt) and it gets flagged as error

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added the changelog accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@vlakius vlakius changed the title updated changelog Typed **kwargs on field constructors Jun 15, 2026
@codspeed-hq

codspeed-hq Bot commented Jun 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 24 untouched benchmarks


Comparing vlakius:develop (3a8b565) with develop (bc4f971)

Open in CodSpeed

Comment thread tortoise/fields/data.py Outdated
Comment thread tortoise/fields/data.py Outdated
@waketzheng

Copy link
Copy Markdown
Contributor

Looks OK for me. @abondar what do you think?

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.

2 participants