Fix PEP-8 issues in accounts/ and admin/

Review Request #4412 — Created Aug. 9, 2013 and submitted

Information

Review Board
master

Reviewers

Fix PEP-8 issues in accounts/ and admin/

This change fixes up most of the issues found by the pep8 tool. The ones that I
left where where we had mapping tables that were formatted for readability.

 
Description From Last Updated

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

'InvalidCacheBackendError' imported but unused

reviewbotreviewbot

'parse_backend_uri' imported but unused

reviewbotreviewbot

Col: 80 E501 line too long (80 > 79 characters)

reviewbotreviewbot

Can we put the label= on their own lines?

chipx86chipx86

This is pep-8-complaint, but it still feels so inconsistent with other uses of patterns(). Mixed feelings, but I'm okay with …

chipx86chipx86

Would parens have solved this and let us have the extra breathing room for text?

chipx86chipx86

This is one I don't like. What does it say about this? I'd much, much prefer we violate pep-8 if …

chipx86chipx86

Same comments about the urlpatterns in this file.

chipx86chipx86
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. reviewboard/accounts/backends.py (Diff revision 1)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  3. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Show all issues
     'InvalidCacheBackendError' imported but unused
    
  3. reviewboard/admin/forms.py (Diff revision 1)
     
     
    Show all issues
     'parse_backend_uri' imported but unused
    
  4. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. reviewboard/accounts/backends.py (Diff revision 2)
     
     
    Show all issues
    Col: 80
     E501 line too long (80 > 79 characters)
    
  3. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
chipx86
  1. 
      
  2. reviewboard/accounts/admin.py (Diff revision 3)
     
     
     
    I think I'll just need to get used to this, but do we want to say now that this is the official method for all multi-line imports now?
  3. reviewboard/accounts/forms.py (Diff revision 3)
     
     
     
     
    Show all issues
    Can we put the label= on their own lines?
  4. reviewboard/accounts/forms.py (Diff revision 3)
     
     
     
    Do you know if the tool would be happy doing:
    
    _(.....
      .....)
    % {
        ...
    }
    1. Yeah, that works.
  5. reviewboard/accounts/urls.py (Diff revision 3)
     
     
     
     
    Show all issues
    This is pep-8-complaint, but it still feels so inconsistent with other uses of patterns(). Mixed feelings, but I'm okay with this. However, can we have a blank line between this parameter and the urls, to help separate things out?
  6. reviewboard/admin/forms.py (Diff revision 3)
     
     
     
     
     
     
     
     
     
     
    Show all issues
    Would parens have solved this and let us have the extra breathing room for text?
  7. reviewboard/admin/widgets.py (Diff revision 3)
     
     
     
     
     
    Show all issues
    This is one I don't like. What does it say about this?
    
    I'd much, much prefer we violate pep-8 if this is the case. When there's multiple things in the context dictionary, it'll have to be multi-line anyway, and I think consistency is important.
    1. It complained about the relative alignment of { and }.
  8. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/views.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
david
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/evolutions/timezone.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/accounts/views.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/admin/checks.py
        reviewboard/admin/forms.py
        reviewboard/admin/management/commands/dumpdb.py
        reviewboard/admin/siteconfig.py
        reviewboard/admin/views.py
        reviewboard/accounts/backends.py
        reviewboard/admin/templatetags/rbadmintags.py
        reviewboard/accounts/evolutions/timezone.py
        reviewboard/accounts/urls.py
        reviewboard/admin/urls.py
        reviewboard/admin/management/sites.py
        reviewboard/accounts/models.py
        reviewboard/admin/widgets.py
        reviewboard/admin/cache_stats.py
        reviewboard/accounts/admin.py
        reviewboard/accounts/views.py
        reviewboard/admin/middleware.py
        reviewboard/accounts/forms.py
      Ignored Files:
    
    
  2. 
      
chipx86
  1. One last thing, then ship it.
  2. reviewboard/admin/urls.py (Diff revision 5)
     
     
    Show all issues
    Same comments about the urlpatterns in this file.
  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (4db0867).