Skip to content

Improved readability of AppConfig.__init__ and added validation error using f-strings. Refs ticket - N/A #19650

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

Closed
wants to merge 1 commit into from

Conversation

veerababu1729
Copy link

@veerababu1729 veerababu1729 commented Jul 18, 2025

This commit improves the readability of the AppConfig initializer and adds a more informative validation error using f-strings. No logic is changed.

Trac ticket number

ticket - N/A

Branch description

Refactored the __init__ method in the AppConfig class to:

  • Improve code formatting and maintain consistency with PEP8.
  • Add inline comments for clarity, helping new contributors understand the code.
  • Replace % string formatting with modern f-strings for better readability.
  • Ensure the label is a valid Python identifier before usage.
  • Keep functionality unchanged while improving maintainability.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.
  • I have added or updated relevant docs, including release notes if applicable.
  • I have attached screenshots in both light and dark modes for any UI changes.

This commit improves the readability of the AppConfig initializer and adds a more informative validation error using f-strings. No logic is changed.
@github-actions github-actions bot added the no ticket Based on PR title, no linked Trac ticket label Jul 18, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hello! Thank you for your contribution 💪

As it's your first contribution be sure to check out the patch review checklist.

If you're fixing a ticket from Trac make sure to set the "Has patch" flag and include a link to this PR in the ticket!

If you have any design or process questions then you can ask in the Django forum.

Welcome aboard ⛵️!

@felixxm
Copy link
Member

felixxm commented Jul 19, 2025

Thanks for this patch 👍, however we try to avoid trivial code reformatting unless it's a big problem as it creates extra noise in the history.

@felixxm felixxm closed this Jul 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no ticket Based on PR title, no linked Trac ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants