Skip to content

fix: use f-string instead of .format() in show_test_item#14398

Merged
Pierre-Sassoulas merged 2 commits intopytest-dev:mainfrom
JiayangLai:fix/code-quality-improvements
Apr 20, 2026
Merged

fix: use f-string instead of .format() in show_test_item#14398
Pierre-Sassoulas merged 2 commits intopytest-dev:mainfrom
JiayangLai:fix/code-quality-improvements

Conversation

@JiayangLai
Copy link
Copy Markdown
Contributor

Summary

  • Replace deprecated .format() with f-string syntax in show_test_item function

Changes

  • src/_pytest/runner.py: Use f-string for string formatting

Test plan

  • Python syntax verification passed

🤖 Generated with Claude Code

Modernize the code by replacing .format() with f-string syntax.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Pierre-Sassoulas Pierre-Sassoulas added bot:chronographer:provided (automation) changelog entry is part of PR type: performance performance or memory problem/improvement labels Apr 20, 2026
Copy link
Copy Markdown
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Congrats on the first contribution :) Do not hesitate to choose an issue from https://github.com/pytest-dev/pytest/issues, for the next one !

@Pierre-Sassoulas Pierre-Sassoulas merged commit 0b21993 into pytest-dev:main Apr 20, 2026
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR type: performance performance or memory problem/improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants