Merge lp:~barry/aptdaemon/pep8-fixes into lp:aptdaemon

Proposed by Barry Warsaw
Status: Needs review
Proposed branch: lp:~barry/aptdaemon/pep8-fixes
Merge into: lp:aptdaemon
Diff against target: 25 lines (+2/-4)
2 files modified
aptdaemon/__init__.py (+1/-1)
aptdaemon/gtkwidgets.py (+1/-3)
To merge this branch: bzr merge lp:~barry/aptdaemon/pep8-fixes
Reviewer Review Type Date Requested Status
Sebastian Heinlein Pending
Review via email: mp+152743@code.launchpad.net

Description of the change

PEP 8 fixes.

Before:

% pep8 --statistics --show-source --show-pep8 --exclude pkenums.py aptdaemon tests
aptdaemon/__init__.py:22:14: E222 multiple spaces after operator
__version__ = '1.0'
             ^
    Avoid extraneous whitespace in the following situations:

    - More than one space around an assignment (or other) operator to
      align it with another.

    Okay: a = 12 + 3
    E221: a = 4 + 5
    E222: a = 4 + 5
    E223: a = 4\t+ 5
    E224: a = 4 +\t5
aptdaemon/gtkwidgets.py:1103:46: E251 no spaces around keyword / parameter equals
                                   stock_type = gtk.STOCK_DIALOG_ERROR,
                                             ^
    Don't use spaces around the '=' sign when used to indicate a
    keyword argument or a default parameter value.

    Okay: def complex(real, imag=0.0):
    Okay: return magic(r=real, i=imag)
    Okay: boolean(a == b)
    Okay: boolean(a != b)
    Okay: boolean(a <= b)
    Okay: boolean(a >= b)

    E251: def complex(real, imag = 0.0):
    E251: return magic(r = real, i = imag)
aptdaemon/gtkwidgets.py:1103:48: E251 no spaces around keyword / parameter equals
                                   stock_type = gtk.STOCK_DIALOG_ERROR,
                                               ^
    Don't use spaces around the '=' sign when used to indicate a
    keyword argument or a default parameter value.

    Okay: def complex(real, imag=0.0):
    Okay: return magic(r=real, i=imag)
    Okay: boolean(a == b)
    Okay: boolean(a != b)
    Okay: boolean(a <= b)
    Okay: boolean(a >= b)

    E251: def complex(real, imag = 0.0):
    E251: return magic(r = real, i = imag)
aptdaemon/gtkwidgets.py:1106:1: W391 blank line at end of file

^
    JCR: Trailing blank lines are superfluous.

    Okay: spam(1)
    W391: spam(1)\n
1 E222 multiple spaces after operator
2 E251 no spaces around keyword / parameter equals
1 W391 blank line at end of file

After:

% pep8 --statistics --show-source --show-pep8 --exclude pkenums.py aptdaemon tests
%

To post a comment you must log in.

Unmerged revisions

903. By Barry Warsaw

PEP 8 fixes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'aptdaemon/__init__.py'
2--- aptdaemon/__init__.py 2013-03-10 13:38:15 +0000
3+++ aptdaemon/__init__.py 2013-03-11 18:29:25 +0000
4@@ -19,7 +19,7 @@
5
6 __author__ = "Sebastian Heinlein <devel@glatzor.de>"
7 __state__ = "development"
8-__version__ = '1.0'
9+__version__ = '1.0'
10
11 __all__ = ("client", "console", "core", "debconf", "defer", "enums",
12 "errors", "gtkwidgets", "loop", "policykit1", "progress",
13
14=== modified file 'aptdaemon/gtkwidgets.py'
15--- aptdaemon/gtkwidgets.py 2013-03-09 07:27:53 +0000
16+++ aptdaemon/gtkwidgets.py 2013-03-11 18:29:25 +0000
17@@ -1100,7 +1100,5 @@
18 _ExpandableDialog.__init__(self, parent=parent,
19 expander_label=_("_Details"),
20 expanded_child=scrolled,
21- stock_type = gtk.STOCK_DIALOG_ERROR,
22+ stock_type=gtk.STOCK_DIALOG_ERROR,
23 title=title, message=msg)
24-
25-

Subscribers

People subscribed via source and target branches

to status/vote changes: