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-144325: Improve error messages for{}-style formatters for int, float, str, and complex#144326

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
Lil-Ran wants to merge7 commits intopython:main
base:main
Choose a base branch
Loading
fromLil-Ran:formatter-error-msg

Conversation

@Lil-Ran
Copy link

@Lil-RanLil-Ran commentedJan 29, 2026
edited by bedevere-appbot
Loading

This is the first implementation of my suggested changes in the issue.

Some proposals are open for discussion, though the PR already includes test cases.

I would appreciate any feedback or suggestions on these proposed changes.

@python-cla-bot
Copy link

python-cla-botbot commentedJan 29, 2026
edited
Loading

All commit authors signed the Contributor License Agreement.

CLA signed


def test_invalid_specifier_type_error_message(self):
for value in [12j, 12, 12.0, "12"]:
for bad_spec, repr in [
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:repr is a built-in.

Suggested change
forbad_spec,reprin [
forbad_spec,repr_strin [

]:
with self.subTest(value=value, bad_spec=bad_spec):
err = re.escape("Unknown format code "
f"{repr} for object of type "
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
f"{repr} for object of type "
f"{repr_str} for object of type "

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

Reviewers

1 more reviewer

@yuanx749yuanx749yuanx749 left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Lil-Ran@yuanx749

[8]ページ先頭

©2009-2026 Movatter.jp