Page MenuHomePhabricator

Add missing docstrings to Python classes and methods
Closed, ResolvedPublic

Description

Add missing docstrings to Python classes and methods

#qubes-whonix-next

Old Description:

Excess commenting in WhonixMessageBox Class...

/usr/lib/qubes-whonix/alert

https://github.com/Whonix/qubes-whonix/blob/master/usr/lib/qubes-whonix/alert
https://github.com/nrgaway/qubes-whonix/blob/master/usr/lib/qubes-whonix/alert

class WhonixMessageBox(QtGui.QMessageBox):
    '''
    '''
    def __init__(self, message):

should likely be:

class WhonixMessageBox(QtGui.QMessageBox):
    def __init__(self, message):

Details

Impact
Needs Triage

Event Timeline

WhonixQubes assigned this task to nrgaway.
WhonixQubes raised the priority of this task from to Normal.
WhonixQubes updated the task description. (Show Details)
WhonixQubes added a project: Qubes.

IMO, The way is currently is listed is more correct that more properly reflect python syntax although it is still not correct in a PEP8 standard sense since the comment doc string is empty, although this does reflect my personal coding style.

Every class and method should have a doc string if wanting to comply with PEP257 conventions.

One deviation to those standards in my coding style is that:

  1. I usually provide an empty docstring when creating a method as a placeholder since it improves readability
  2. I use single quotes instead of double quotes as many are projects are starting to use.

Therefore the expected change here should be to add a docstring. Maybe you can create that whonix-next tag and add this item to that tag?

Agreed. Will update this ticket now.

WhonixQubes renamed this task from Excess commenting in WhonixMessageBox Class to Add missing docstrings to Python classes and methods.Feb 16 2015, 1:58 PM
WhonixQubes updated the task description. (Show Details)
Patrick set Impact to Needs Triage.