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

gh-107944: Improve error message for getargs with bad keyword arguments#114792

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

Merged
hauntsaninja merged 6 commits intopython:mainfromhauntsaninja:gh107944
Feb 8, 2024

Conversation

hauntsaninja
Copy link
Contributor

@hauntsaninjahauntsaninja commentedJan 31, 2024
edited by bedevere-appbot
Loading

}
else {
PyErr_Format(PyExc_TypeError,
"%.200s%s got an unexpected keyword argument '%S'",
Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I made this error message match the one in ceval.c

@hauntsaninja
Copy link
ContributorAuthor

I still need to do thevgetargskeywords path...

@@ -987,6 +987,14 @@ def case_change_over_substitution(BLuch=None, Luch = None, fluch = None):
with self.check_suggestion_includes(suggestion):
func(bluch=None)

def test_unexpected_keyword_suggestion_via_getargs(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Do you mind adding a explicit test for when the suggestion fails (the 'else' case in the conditionalhere

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the review! I added this test.

I also made a similar edit in thevgetargskeywords code path and added tests.

Copy link
Member

@pablogsalpablogsal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Very good work@hauntsaninja! Thanks for working on this

This looks great, I left some nit but please feel free to ignore

@hauntsaninjahauntsaninja merged commit17689e3 intopython:mainFeb 8, 2024
@hauntsaninjahauntsaninja deleted the gh107944 branchFebruary 8, 2024 09:04
fsc-eriker pushed a commit to fsc-eriker/cpython that referenced this pull requestFeb 14, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@pablogsalpablogsalpablogsal approved these changes

@iritkatrieliritkatrielAwaiting requested review from iritkatrieliritkatriel is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@hauntsaninja@pablogsal

[8]ページ先頭

©2009-2025 Movatter.jp