[Django] #24175: Style guide, docstring verb and PEP 257

10 views
Skip to first unread message

Django

unread,
Jan 18, 2015, 1:55:30 PM1/18/15
to django-...@googlegroups.com
#24175: Style guide, docstring verb and PEP 257
------------------------------------------------+------------------------
Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
The current version of our style guide is recommending to use action verb
(Checks instead of Check). However this contradicts PEP 257 (Docstring
Conventions).
https://www.python.org/dev/peps/pep-0257/

The current code is mixing those two forms. I'm not advocating to change
all occurrences, but I'd like to see our style guide to match Python
recommendations.

--
Ticket URL: <https://code.djangoproject.com/ticket/24175>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 18, 2015, 2:23:17 PM1/18/15
to django-...@googlegroups.com
#24175: Style guide, docstring verb and PEP 257
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by collinanderson):

* cc: cmawebsite@… (added)
* stage: Unreviewed => Accepted


Comment:

Sounds like a good idea to me. Seems to me if we change the style guide,
we should also change all occurrences. It could be an "easy pickings"
ticket.

Accepting based on Tim also agreeing:
https://github.com/django/django/pull/3939/files#r23134983

--
Ticket URL: <https://code.djangoproject.com/ticket/24175#comment:1>

Django

unread,
Jan 28, 2015, 7:16:38 AM1/28/15
to django-...@googlegroups.com
#24175: Style guide, docstring verb and PEP 257
--------------------------------------+------------------------------------

Reporter: claudep | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/24175#comment:2>

Django

unread,
Jan 28, 2015, 4:31:38 PM1/28/15
to django-...@googlegroups.com
#24175: Style guide, docstring verb and PEP 257
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by claudep):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/24175#comment:3>

Django

unread,
Jan 28, 2015, 11:31:53 PM1/28/15
to django-...@googlegroups.com
#24175: Style guide, docstring verb and PEP 257
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: master

Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by jarshwah):

Do you think it's worth leaving an example in there (flip the good/not-
good examples) to give some at-a-glance guidance? The alternative is
running off to review the PEP. I don't feel strongly about this though.

--
Ticket URL: <https://code.djangoproject.com/ticket/24175#comment:4>

Django

unread,
Jan 29, 2015, 12:22:28 PM1/29/15
to django-...@googlegroups.com
#24175: Style guide, docstring verb and PEP 257
-------------------------------------+-------------------------------------
Reporter: claudep | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"63412262e54b4814fe115502bebded9c9993b6f7"]:
{{{
#!CommitTicketReference repository=""
revision="63412262e54b4814fe115502bebded9c9993b6f7"
Fixed #24175 -- Updated docstring convention.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/24175#comment:5>

Reply all
Reply to author
Forward
0 new messages