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

Improve decorator type error message for decorated functions (#16295)#20381

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
LeoLomardo wants to merge7 commits intopython:master
base:master
Choose a base branch
Loading
fromLeoLomardo:newfeature

Conversation

@LeoLomardo
Copy link

This PR is related with the issue#16295

Checklist:

  • Clarifies error reporting when a decorator (or decorator factory) supplies an incompatible callable signature, including the decorated function’s name.
  • Adds regression test for decorator factory application to verify the detailed message.

@github-actions

This comment has been minimized.

deleted:    long_functions.csvremoved long_functions.csv because it is no longer needed in the project.
@github-actions

This comment has been minimized.

@github-actions
Copy link
Contributor

Diff frommypy_primer, showing the effect of this PR on open source code:

prefect (https://github.com/PrefectHQ/prefect)- src/prefect/client/schemas/objects.py:306: error: Argument 1 has incompatible type "Callable[[State[R], bool, bool], R | Exception]"; expected "Callable[[State[R], Literal[True], bool], R]"  [arg-type]+ src/prefect/client/schemas/objects.py:306: error: Decorated function "result" has incompatible type "Callable[[State[R], bool, bool], R | Exception]"; expected "Callable[[State[R], Literal[True], bool], R]"  [arg-type]
wyattscarpenter reacted with rocket emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@LeoLomardo

[8]ページ先頭

©2009-2025 Movatter.jp