Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#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 siama, 5 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 modernRefactors error messages in the `_dec` method to use f-strings instead of the older `%` formatting method.

comment:2 by siama, 5 months ago

Has patch: set

comment:3 by siama, 5 months ago

Cc: siama removed
Resolution: invalid
Status: assignedclosed

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."

Last edited 5 months ago by Tim Graham (previous) (diff)
Note: See TracTickets for help on using tickets.
Back to Top