Skip to content

Update README.md to use f-string examples - #2318

Open
Allen (allen505) wants to merge 1 commit into
confluentinc:masterfrom
allen505:update-outdate-practices-readme
Open

Update README.md to use f-string examples#2318
Allen (allen505) wants to merge 1 commit into
confluentinc:masterfrom
allen505:update-outdate-practices-readme

Conversation

@allen505

@allen505 Allen (allen505) commented Jul 30, 2026

Copy link
Copy Markdown

Fixes #2250

What

Updated the README.md to use the newer f-string examples instead of using the .format() method

Checklist

  • Contains customer facing changes? Including API/behavior changes
  • Did you add sufficient unit test and/or integration test coverage for this PR?
    • If not, please explain why it is not required

References

JIRA: NA

Fixes #2250

Test & Review

Checked the README rendered on Github

Open questions / Follow-ups

Copilot AI review requested due to automatic review settings July 30, 2026 00:59
@confluent-cla-assistant

confluent-cla-assistant Bot commented Jul 30, 2026

Copy link
Copy Markdown

🎉 All Contributor License Agreements have been signed. Ready to merge.
✅ allen505
Please push an empty commit if you would like to re-run the checks to verify CLA status for all contributors.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the project’s main README examples to use modern Python f-strings, aligning the documentation with current Python style and the repository’s supported Python versions.

Changes:

  • Converted producer delivery-report example prints from .format() to f-strings.
  • Converted consumer error/received-message prints from .format() to f-strings.
  • Converted AdminClient topic creation success/failure prints from .format() to f-strings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi Allen (@allen505)
Thanks for the PR, just one minor nit.

Comment thread README.md
Triggered by poll() or flush()."""
if err is not None:
print('Message delivery failed: {}'.format(err))
print(f'Message delivery failed: {err}')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit, the consumer and AdminClient examples below use f"..."
Since you're already touching these lines, mind matching?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Did you mean like, matching the error message? Coz both of them use the update f-strings now

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I meant the quote character, not the f-string. Could you change f'...' to f"..." on both lines to match the consumer/AdminClient examples (and black's convention).

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Outdated practises shown in README.md

3 participants