#35582 closed Cleanup/optimization (invalid)
Refactors error messages in the `_dec` method to use f-strings instead of the older `%` formatting method.
Reported by: | siama | Owned by: | siama |
---|---|---|---|
Component: | Utilities | Version: | 5.1 |
Severity: | Normal | Keywords: | f-strings, code readability |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Description
This pull request refactors error messages in the _dec
method to use f-strings instead of the older %
formatting method. F-strings are more readable and modern, improving the overall code quality and consistency.
Changes Made
- Converted string formatting in error messages to use f-strings.
- Enhanced readability of error messages.
Benefits
- Improved readability and maintainability of the code.
- Consistency with modern Python practices.
Testing
- Ran existing tests to ensure no functionality is broken.
Change History (3)
comment:1 by , 6 months ago
Summary: | Refactors error messages in the `_dec` method to use f-strings instead of the older `%` formatting method. F-strings are more readable and modern → Refactors error messages in the `_dec` method to use f-strings instead of the older `%` formatting method. |
---|
comment:2 by , 6 months ago
Has patch: | set |
---|
comment:3 by , 6 months ago
Cc: | removed |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
As per Simon's comment on the PR, "Thank you for your interest in contributing to Django but we don't accept localized cosmetic changes of this nature."