[Django] #25159: Remove brackets from method/function signatures in docs

5 views
Skip to first unread message

Django

unread,
Jul 22, 2015, 8:11:12 AM7/22/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
According to the [http://sphinx-
doc.org/domains.html?highlight=function#signatures spinx docs], "For
functions with optional parameters that don’t have default values
(typically functions implemented in C extension modules without keyword
argument support), you can use brackets to specify the optional parts".
Not sure how our docs got in the habit of using brackets, but it doesn't
seem like we should be doing that.

Brackets should be removed from things like:

`.. function:: create_test_db([verbosity=1, autoclobber=False,
serialize=True, keepdb=False])`

and missing kwarg defaults should be added in places like:

`.. function:: password_reset_confirm(request[, uidb64, token,
template_name, token_generator, set_password_form, post_reset_redirect,
current_app, extra_context])`


Find the places to update with `grep -rI "\[" * | grep 'function::'` and
`grep -rI "\[" * | grep 'method::'`.

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

Django

unread,
Jul 25, 2015, 3:21:33 PM7/25/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: hellbeast
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by hellbeast):

* owner: nobody => hellbeast
* status: new => assigned


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

Django

unread,
Jul 25, 2015, 3:58:17 PM7/25/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
--------------------------------------+------------------------------------
Reporter: timgraham | Owner:

Type: Cleanup/optimization | Status: new
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by hellbeast):

* owner: hellbeast =>
* status: assigned => new


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

Django

unread,
Jul 27, 2015, 8:08:38 AM7/27/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => assigned

* owner: => timgraham


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

Django

unread,
Jul 27, 2015, 9:34:11 AM7/27/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: assigned
Cleanup/optimization |
Component: Documentation | Version: 1.8
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/5054 PR]

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

Django

unread,
Jul 27, 2015, 10:35:33 AM7/27/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

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


Comment:

In [changeset:"87d55081ea398c65b2503d22ed3907a9175ec729" 87d5508]:
{{{
#!CommitTicketReference repository=""
revision="87d55081ea398c65b2503d22ed3907a9175ec729"
Fixed #25159 -- Removed brackets from class/function/method signatures in
docs.

Thanks hellbeast for the initial patch.
}}}

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

Django

unread,
Jul 27, 2015, 10:45:17 AM7/27/15
to django-...@googlegroups.com
#25159: Remove brackets from method/function signatures in docs
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner: timgraham
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 1.8
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

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

Comment (by Tim Graham <timograham@…>):

In [changeset:"a66d843eecca9f308fb5b4505546d28d7237757b" a66d843]:
{{{
#!CommitTicketReference repository=""
revision="a66d843eecca9f308fb5b4505546d28d7237757b"
[1.8.x] Fixed #25159 -- Removed brackets from class/function/method
signatures in docs.

Thanks hellbeast for the initial patch.

Backport of 87d55081ea398c65b2503d22ed3907a9175ec729 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25159#comment:6>

Reply all
Reply to author
Forward
0 new messages