• 
      

    Do some clean-up on the ReviewBot worker code.

    Review Request #8433 — Created Sept. 24, 2016 and submitted

    Information

    ReviewBot
    master
    e13d365...

    Reviewers

    This change adds unicode_literals, docstrings, and does some cleanup for the
    worker code. I haven't done docstrings for the individual tools because I got
    lazy.

    Tested that workers still responded correctly.

    Description From Last Updated

    Also optional, I think.

    mike_conleymike_conley

    Missing env

    mike_conleymike_conley

    I think these are optional. At least, there are default args set.

    mike_conleymike_conley

    Can we call this queue_name ?

    brenniebrennie

    "File"

    brenniebrennie

    % (...) on next line

    brenniebrennie

    Mind putting a blank line here?

    chipx86chipx86

    And here.

    chipx86chipx86

    "temporary"

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    "will only single line comment" might be missing a word or two.

    chipx86chipx86

    Missing trailing period.

    chipx86chipx86

    Missing a type.

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    Missing a type.

    chipx86chipx86

    "bool"

    chipx86chipx86

    Missing a "Returns".

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    "bool"

    chipx86chipx86

    :py:attr: is only for class attributes. There's no role for parameters. This should just use standard double backticks.

    chipx86chipx86

    "bool"

    chipx86chipx86
    reviewbot
    1. Tool: PEP8 Style Checker
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
      
      Tool: Pyflakes
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
    2. 
        
    mike_conley
    1. 
        
    2. bot/reviewbot/processing/review.py (Diff revision 1)
       
       
       
      Show all issues

      Also optional, I think.

    3. bot/reviewbot/processing/review.py (Diff revision 1)
       
       
       
       

      Should we be turning these TODO's into Splat bugs?

      1. No, I don't think so. Especially not at this stage of reviewbot.

    4. bot/reviewbot/tools/process.py (Diff revision 1)
       
       
      Show all issues

      Missing env

    5. bot/reviewbot/tools/process.py (Diff revision 1)
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      I think these are optional. At least, there are default args set.

    6. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
    2. 
        
    brennie
    1. 
        
    2. bot/reviewbot/celery.py (Diff revision 2)
       
       
      Show all issues

      Can we call this queue_name ?

    3. bot/reviewbot/processing/review.py (Diff revision 2)
       
       
      Show all issues

      "File"

    4. bot/reviewbot/processing/review.py (Diff revision 2)
       
       
       
      Show all issues

      % (...) on next line

      1. Alternatively:

        warning = (
            'WARNING: Number of comments exceeded, showing %d of %d.'
            % (max_comments, len(self.comments))
        )
        
    5. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
    2. 
        
    chipx86
    1. 
        
    2. bot/reviewbot/processing/filesystem.py (Diff revision 3)
       
       
       
      Show all issues

      Mind putting a blank line here?

    3. bot/reviewbot/processing/filesystem.py (Diff revision 3)
       
       
       
      Show all issues

      And here.

    4. bot/reviewbot/processing/filesystem.py (Diff revision 3)
       
       
      Show all issues

      "temporary"

    5. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
       
       
       
      Show all issues

      "bool"

    6. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    7. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    8. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    9. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
      Show all issues

      "will only single line comment" might be missing a word or two.

    10. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
      Show all issues

      Missing trailing period.

    11. bot/reviewbot/processing/review.py (Diff revision 3)
       
       
       
       
      Show all issues

      Missing a type.

    12. bot/reviewbot/tasks.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    13. bot/reviewbot/tasks.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    14. bot/reviewbot/tasks.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    15. bot/reviewbot/tools/__init__.py (Diff revision 3)
       
       
       
      Show all issues

      Missing a type.

    16. bot/reviewbot/tools/__init__.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    17. bot/reviewbot/tools/process.py (Diff revision 3)
       
       
       
       
      Show all issues

      Missing a "Returns".

    18. bot/reviewbot/tools/process.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    19. bot/reviewbot/tools/process.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    20. bot/reviewbot/tools/process.py (Diff revision 3)
       
       
       
       
       
       
       
       
       
       
      Show all issues

      "bool"

    21. bot/reviewbot/utils.py (Diff revision 3)
       
       
      Show all issues

      "bool"

    22. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          bot/reviewbot/tools/process.py
          bot/reviewbot/tasks.py
          bot/reviewbot/utils.py
          bot/reviewbot/tools/__init__.py
          bot/reviewbot/tools/pyflakes.py
          bot/reviewbot/tools/pep8.py
          bot/reviewbot/processing/filesystem.py
          bot/reviewbot/tools/cpplint.py
          bot/reviewbot/tools/buildbot.py
          bot/reviewbot/celery.py
          bot/reviewbot/tools/cppcheck.py
          bot/reviewbot/tools/jshint.py
          bot/reviewbot/__init__.py
          bot/reviewbot/processing/review.py
      
      
    2. 
        
    chipx86
    1. 
        
    2. bot/reviewbot/tools/process.py (Diff revisions 3 - 4)
       
       
      Show all issues

      :py:attr: is only for class attributes. There's no role for parameters. This should just use standard double backticks.

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