Fixed a few PEP-8 issues.

Review Request #6638 — Created Nov. 24, 2014 and submitted

Information

Review Board
master
423f6ef...

Reviewers

Since some issues have slipped past ReviewBot (plus there are a lot we never fixed). This change fixes almost everything ouside the modules, with the exception of a few things PEP-8 considers as problems but are actually preferred.

Ran unit tests, and pep8.

Description From Last Updated

I'd rather not do this. There's no real point in practice. Same for all other asserts on imports.

chipx86chipx86

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot

This just makes the code more error-prone and less readable. I'd prefer you undo it.

chipx86chipx86

There's a # in the comment now.

chipx86chipx86

'django_reset' imported but unused

reviewbotreviewbot

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot

'PIPELINE_CSS' imported but unused

reviewbotreviewbot

'PIPELINE_JS' imported but unused

reviewbotreviewbot

'django_reset' imported but unused

reviewbotreviewbot

I think the better fix (since this has a character in it) would be to prefix this line with 'r' …

daviddavid

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot

'PIPELINE_CSS' imported but unused

reviewbotreviewbot

'PIPELINE_JS' imported but unused

reviewbotreviewbot

'django_reset' imported but unused

reviewbotreviewbot

'from settings_local import *' used; unable to detect undefined names

reviewbotreviewbot

'PIPELINE_CSS' imported but unused

reviewbotreviewbot

'PIPELINE_JS' imported but unused

reviewbotreviewbot
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        ez_setup.py
        setup.py
        reviewboard/staticbundles.py
        reviewboard/settings.py
        reviewboard/__init__.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        ez_setup.py
        setup.py
        reviewboard/staticbundles.py
        reviewboard/settings.py
        reviewboard/__init__.py
    
    
  2. reviewboard/settings.py (Diff revision 1)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
    1. What does this really mean?

  3. 
      
chipx86
  1. ez_setup.py isn't maintained by us. We should revert all changes to it.

    By the way, if you're not already, run ./contrib/internal/run-pyflakes.py instead of just pyflakes.

  2. reviewboard/__init__.py (Diff revision 1)
     
     
    Show all issues

    I'd rather not do this. There's no real point in practice.

    Same for all other asserts on imports.

  3. reviewboard/staticbundles.py (Diff revision 1)
     
     
     
     
     
     
     
     
     
    Show all issues

    This just makes the code more error-prone and less readable. I'd prefer you undo it.

  4. setup.py (Diff revision 1)
     
     
    Show all issues

    There's a # in the comment now.

  5. 
      
justy777
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        setup.py
        reviewboard/settings.py
        reviewboard/staticbundles.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        setup.py
        reviewboard/settings.py
        reviewboard/staticbundles.py
    
    
  2. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'PIPELINE_CSS' imported but unused
    
  5. reviewboard/settings.py (Diff revision 2)
     
     
    Show all issues
     'PIPELINE_JS' imported but unused
    
  6. 
      
justy777
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        setup.py
        reviewboard/settings.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        setup.py
        reviewboard/settings.py
    
    
  2. reviewboard/settings.py (Diff revision 3)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 3)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. reviewboard/settings.py (Diff revision 3)
     
     
    Show all issues
     'PIPELINE_CSS' imported but unused
    
  5. reviewboard/settings.py (Diff revision 3)
     
     
    Show all issues
     'PIPELINE_JS' imported but unused
    
  6. 
      
justy777
david
  1. 
      
  2. reviewboard/settings.py (Diff revision 3)
     
     
    Show all issues

    I think the better fix (since this has a character in it) would be to prefix this line with 'r' as well.

  3. 
      
justy777
reviewbot
  1. Tool: Pyflakes
    Processed Files:
        setup.py
        reviewboard/settings.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        setup.py
        reviewboard/settings.py
    
    
  2. reviewboard/settings.py (Diff revision 4)
     
     
    Show all issues
     'django_reset' imported but unused
    
  3. reviewboard/settings.py (Diff revision 4)
     
     
    Show all issues
     'from settings_local import *' used; unable to detect undefined names
    
  4. reviewboard/settings.py (Diff revision 4)
     
     
    Show all issues
     'PIPELINE_CSS' imported but unused
    
  5. reviewboard/settings.py (Diff revision 4)
     
     
    Show all issues
     'PIPELINE_JS' imported but unused
    
  6. 
      
brennie
  1. Ship It!
  2. 
      
chipx86
  1. Ship It!
  2. 
      
justy777
Review request changed
Status:
Completed
Change Summary:
Pushed to master (5e0ac9c)