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

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

Merged
merged 1 commit into from Jun 12, 2017

Conversation

timgraham
Copy link
Member

I'm going to leave this open for a little while and add other things that I came across as I do reviews.
https://code.djangoproject.com/ticket/27655

@timgraham timgraham changed the title Fixed #27655 -- Added some guidelines to the coding style docs. [WIP] Fixed #27655 -- Added some guidelines to the coding style docs. Apr 1, 2017
@sir-sigurd
Copy link
Member

I think this could need some clarification too:

with self.assertRaisesMessage(
    SomeError,
    'very '
    'long '
    'message.'
):

vs.

msg = (
    'very '
    'long '
    'message.'
)
with self.assertRaisesMessage(SomeError, msg):


* Use single quotes for strings, or a double quote if the the string contains a
single quote. Don't waste time doing unrelated refactoring of existing code
to confirm to this style.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo, should be conform


raise AttributeError(
"Here is a multine error message "
"shortened for clarity."
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

this should be single quotes as per the next bullet point 😉

@adamchainz
Copy link
Sponsor Member

This has been open some time now, merge it and create another if any more rules crop up?

@timgraham timgraham changed the title [WIP] Fixed #27655 -- Added some guidelines to the coding style docs. Fixed #27655 -- Added some guidelines to the coding style docs. Jun 12, 2017
@timgraham timgraham merged commit c68f5d8 into django:master Jun 12, 2017
@timgraham timgraham deleted the 27655 branch June 12, 2017 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants