Opened 6 years ago
Closed 6 years ago
#30620 closed Cleanup/optimization (fixed)
A full example in documentation is not PEP8 compliant.
| Reported by: | Nuno | Owned by: | Nuno |
|---|---|---|---|
| Component: | Documentation | Version: | dev |
| Severity: | Normal | Keywords: | documentation PEP8 |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description
This is the smallest of issues, but nevertheless here it goes:
There's one line break missing at line https://github.com/django/django/blob/master/docs/topics/auth/customizing.txt#L1172, so that the example code is PEP8 compliant.
I would be happy to submit my very first PR if that's ok.
Change History (4)
comment:1 by , 6 years ago
| Summary: | Code example in documentation not PEP8 compliant → A full example in documentation is not PEP8 compliant. |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
| Version: | 2.2 → master |
comment:2 by , 6 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
Thanks for this report. Normally we don't restrict all PEP8 rules in examples, e.g. in most of cases we don't put 2 blank lines before class definition. In this case we have a full example that can be copy & paste, so we can make it PEP8 compliant, for that please fix also
add_fieldsets:diff --git a/docs/topics/auth/customizing.txt b/docs/topics/auth/customizing.txt index daec10c28e..7d287051d8 100644 --- a/docs/topics/auth/customizing.txt +++ b/docs/topics/auth/customizing.txt @@ -1162,13 +1162,14 @@ code would be required in the app's ``admin.py`` file:: add_fieldsets = ( (None, { 'classes': ('wide',), - 'fields': ('email', 'date_of_birth', 'password1', 'password2')} - ), + 'fields': ('email', 'date_of_birth', 'password1', 'password2'), + }), ) search_fields = ('email',) ordering = ('email',) filter_horizontal = ()