Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#27655 closed Cleanup/optimization (fixed)

Styleguide missing - Use single quotes instead of double quotes in string

Reported by: Anton Samarchyan Owned by: Tim Graham
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: desecho@… Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description

Use single quotes instead of double quotes in string if the string itself doesn't contain them. (https://github.com/django/django/pull/7470#discussion_r90120125)
I haven't found this code style standard here https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/
We should probably add it?

Change History (6)

comment:1 by Tim Graham, 7 years ago

Triage Stage: UnreviewedReady for checkin
Type: New featureCleanup/optimization

The advice I've been giving is:

  • Use single quotes for strings, or a double quote if the the string contains a single quote. Don't bother refactoring existing code to confirm to this style.

I'll commit that if there's no other feedback.

comment:2 by ChillarAnand, 7 years ago

Owner: changed from nobody to ChillarAnand
Status: newassigned

comment:3 by Tim Graham, 7 years ago

Easy pickings: unset
Owner: changed from ChillarAnand to Tim Graham
Triage Stage: Ready for checkinAccepted

I'm going to add some other guidelines with common review comments that I make.

comment:4 by Tim Graham, 7 years ago

Has patch: set
Patch needs improvement: set

WIP PR. I might add more guidelines as I think of them.

comment:5 by GitHub <noreply@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In c68f5d83:

Fixed #27655 -- Added some guidelines to the coding style docs.

comment:6 by Tim Graham <timograham@…>, 7 years ago

In 7fb148a:

[1.11.x] Fixed #27655 -- Added some guidelines to the coding style docs.

Backport of c68f5d83c0a4ea4ccf87c7d1d5dd1e9f7b2907a3 from master

Note: See TracTickets for help on using tickets.
Back to Top