Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor __repr__ method in TinyDB class for clarity and consistency #579

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

marcfreir
Copy link

This pull request improves the __repr__ method in the TinyDB class for better readability and maintainability by:

  • Using f-strings instead of .format() for string interpolation.
  • Keeping the functionality identical while improving clarity and modernizing the code style.
  • Verified with tests to ensure no changes to functionality.

@msiemens
Copy link
Owner

msiemens commented Dec 3, 2024

Hey @marcfreir, thanks for your PR! I like rewriting the .format calls to f-strings. Could you just make sure you use single quotes ' instead of double quotes " like the rest of the code does (except for doc strings)?

@marcfreir
Copy link
Author

Hey @marcfreir, thanks for your PR! I like rewriting the .format calls to f-strings. Could you just make sure you use single quotes ' instead of double quotes " like the rest of the code does (except for doc strings)?

Hi @msiemens, thanks for the feedback! I'll update the PR to use single quotes to maintain consistency with the project's code style. I'll push the changes shortly.

@marcfreir marcfreir force-pushed the refactor-repr-method branch from 7499725 to b8a3928 Compare December 4, 2024 00:01
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.

2 participants