Add pydocstyle tool to Review Bot

Review Request #10197 — Created Oct. 4, 2018 and submitted

ilaw
ReviewBot
master
738b160...
reviewbot, students

Users can now configure Review Bot to run pydocstyle, a tool for checking
compliance with Python docstring conventions.

Pydocstyle is not added to the install requires list and users will
need to manually install it to use it.

Pydocstyle defaults to using the PEP 257 docstring convention but users
can add a list of errors to ignore which will override the convention.

Tested dependency check by running reviewbot worker command without
pydocstyle installed

Tested pydocstyle by adding new configuration to Review Bot integration
and publishing a review. Also tested with errors added to ignore list.

  • 0
  • 0
  • 13
  • 9
  • 22
Description From Last Updated
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

ilaw
brennie
  1. 
      
  2. bot/reviewbot/tools/pydocstyle.py (Diff revision 2)
     
     

    Can you add a module-level docstring describing what the file is/does?

    1. Should I make it the same as the class-level docstring ("""Review Bot tool to run pydocstyle.""") which is what flake8.py does?

  3. bot/reviewbot/tools/pydocstyle.py (Diff revision 2)
     
     

    "PEP 257"

  4. 
      
brennie
  1. 
      
  2. bot/setup.py (Diff revision 2)
     
     

    This patch should build upon your previous patch and add pydocstyle to the all extra_requires section.

  3. 
      
ilaw
brennie
  1. 
      
  2. bot/setup.py (Diff revision 3)
     
     
     
     

    Alphabetical order.

  3. 
      
ilaw
david
  1. 
      
  2. bot/reviewbot/tools/pydocstyle.py (Diff revision 4)
     
     

    Please use single quotes instead of double.

  3. bot/reviewbot/tools/pydocstyle.py (Diff revision 4)
     
     

    Please use single quotes instead of double here.

  4. 
      
ilaw
david
  1. 
      
  2. We also need to add documentation for the pydocstyle tool.

  3. In your summary and description, "ReviewBot" -> "Review Bot"

  4. 
      
ilaw
david
  1. 
      
  2. docs/reviewbot/tools/pydocstyle.rst (Diff revision 6)
     
     
     

    This is rst, which has a somewhat different markup for code formatting than markdown. This should probably be:

    :command:`pydocstyle` can be installed on most systems by running::
    
        $ pip install pydocstyle
    

    I notice now that the earlier changes made this same mistake, so I'll fix up the ones that are already in the tree.

    1. Here's the full text I'm using:

      :command:`pyflakes` can be installed on most systems by running::
      
          $ pip install pyflakes
      
      It may also be available in your system's package manager.
      
  3. 
      
ilaw
david
  1. Ship It!
  2. 
      
gojeffcho
  1. 
      
  2. bot/reviewbot/tools/pydocstyle.py (Diff revision 7)
     
     
     

    I don't believe these lines are needed here, only the (duplicated) docstring under your class PydocstyleTool on line 9.

    1. Barret said to add a module-level docstring in addition to the class-level docstring

  3. bot/reviewbot/tools/pydocstyle.py (Diff revision 7)
     
     

    Should this be looking for something a little more specific than the broad Exception class?

    1. I think it's good to have it as a catch-all in case there were parsing issues and if some lines don't have the format we want

  4. 
      
david
  1. Ship It!
  2. 
      
ilaw
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (6773084)
Loading...