Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Supporttyping.get_type_hints(partial(fn, ...)) by 'unwrapping' thepartial, and discarding hints for bound arguments #131391

Open
Labels
stdlibPython modules in the Lib dirtopic-typingtype-featureA feature request or enhancement
@Zac-HD

Description

@Zac-HD

We addedthis to Hypothesis'get_type_hints() helpera few years ago, and while most of that function is clearly not suitable to upstream, it struck me recently that "works withfunctools.partial" could quite reasonably be added to the stdlib function.

It's also plausible that thetyping module prefers to avoid callinginspect.signature, though I don't have a great sense of how to determine which parameters have been bound without getting the signature of thepartial object. In any case, the implementation need not be the same as in Hypothesis, althoughas the author you're welcome to use that code if you'd like.

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibPython modules in the Lib dirtopic-typingtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp