Opened 3 years ago

Closed 3 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


This is the smallest of issues, but nevertheless here it goes:

There's one line break missing at line, 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 Changed 3 years ago by Mariusz Felisiak

Summary: Code example in documentation not PEP8 compliantA full example in documentation is not PEP8 compliant.
Triage Stage: UnreviewedAccepted
Version: 2.2master

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 ```` 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 = ()

comment:2 Changed 3 years ago by Mariusz Felisiak

Owner: changed from nobody to Nuno
Status: newassigned

comment:3 Changed 3 years ago by Nuno

Has patch: set

Submitted PR in Github.

Link: PR

comment:4 Changed 3 years ago by Mariusz Felisiak <felisiak.mariusz@…>

Resolution: fixed
Status: assignedclosed

In 34a88b21:

Fixed #30620 -- Made an example of admin-compliant custom user app pep8 compliant.

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