Do a bunch of clean-up work for Review Bot.

Review Request #8423 — Created Sept. 20, 2016 and submitted

Information

ReviewBot
master
b52d471...

Reviewers

In preparation for some modernization, I'm doing a little bit of clean-up (and
familiarizing myself with the codebase). This change primarily adds
unicode_literals and fixes up docstrings, though there are a few places where
I've made things more idiomatic or simpler.

Verified that the extension loaded correctly. Looked at the various forms in
the admin UI.

Description From Last Updated

Blank line between these.

brenniebrennie

Blank line between these.

brenniebrennie

Blank line ebtween these.

brenniebrennie

Can we pull this out into a variable?

brenniebrennie

Do we want this to be @py2_unicode_compatiable (so __str__ also works?

brenniebrennie

You can add an Attributes section, like Args in method definitions. e.g. """... Attributes: tool_options (type of tool_options): Description """

brenniebrennie

Blank line between these.

brenniebrennie

Do we want this to be @py2_unicode_compatiable (so __str__ also works?

brenniebrennie

Blank line between these.

brenniebrennie

Do we want this to be @py2_unicode_compatiable (so __str__ also works?

brenniebrennie

Blank line between these.

brenniebrennie

Do we want this to be @py2_unicode_compatiable (so __str__ also works?

brenniebrennie

Exception as e? Do we want to limit to Python 2.6+ ?

brenniebrennie
brennie
  1. 
      
  2. extension/reviewbotext/admin.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  3. extension/reviewbotext/admin.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  4. extension/reviewbotext/admin.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line ebtween these.

  5. extension/reviewbotext/forms.py (Diff revision 1)
     
     
     
     
     
    Show all issues

    Can we pull this out into a variable?

    1. I don't care enough because I'm actually going to be removing this code.

  6. extension/reviewbotext/models.py (Diff revision 1)
     
     
    Show all issues

    Do we want this to be @py2_unicode_compatiable (so __str__ also works?

  7. extension/reviewbotext/models.py (Diff revision 1)
     
     
    Show all issues

    You can add an Attributes section, like Args in method definitions.

    e.g.

    """...
    
    Attributes:
        tool_options (type of tool_options):
            Description
    """
    
    1. Going to use a #: comment instead.

  8. extension/reviewbotext/models.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  9. extension/reviewbotext/models.py (Diff revision 1)
     
     
    Show all issues

    Do we want this to be @py2_unicode_compatiable (so __str__ also works?

  10. extension/reviewbotext/models.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  11. extension/reviewbotext/models.py (Diff revision 1)
     
     
    Show all issues

    Do we want this to be @py2_unicode_compatiable (so __str__ also works?

  12. extension/reviewbotext/models.py (Diff revision 1)
     
     
     
    Show all issues

    Blank line between these.

  13. extension/reviewbotext/models.py (Diff revision 1)
     
     
    Show all issues

    Do we want this to be @py2_unicode_compatiable (so __str__ also works?

  14. 
      
david
reviewbot
  1. Tool: PEP8 Style Checker
    Processed Files:
        extension/reviewbotext/extension.py
        extension/reviewbotext/admin_urls.py
        extension/reviewbotext/managers.py
        extension/reviewbotext/__init__.py
        extension/reviewbotext/admin.py
        extension/reviewbotext/forms.py
        extension/reviewbotext/handlers.py
        extension/reviewbotext/resources.py
        extension/reviewbotext/models.py
    
    Ignored Files:
        extension/setup.cfg
        extension/reviewbotext/templates/admin/reviewbotext/tool/change_form.html
    
    
    
    Tool: Pyflakes
    Processed Files:
        extension/reviewbotext/extension.py
        extension/reviewbotext/admin_urls.py
        extension/reviewbotext/managers.py
        extension/reviewbotext/__init__.py
        extension/reviewbotext/admin.py
        extension/reviewbotext/forms.py
        extension/reviewbotext/handlers.py
        extension/reviewbotext/resources.py
        extension/reviewbotext/models.py
    
    Ignored Files:
        extension/setup.cfg
        extension/reviewbotext/templates/admin/reviewbotext/tool/change_form.html
    
    
  2. 
      
brennie
  1. 
      
  2. extension/reviewbotext/forms.py (Diff revision 2)
     
     
    Show all issues

    Exception as e?
    Do we want to limit to Python 2.6+ ?

    1. Review Bot 1.0 will be Review Board 3.0+ only, so yes.

  3. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (365ebfe)