After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 776009 - pep8 failures with pep8 1.7.0
pep8 failures with pep8 1.7.0
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-12 19:27 UTC by Emilio Pozuelo Monfort
Modified: 2017-01-10 14:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix new PEP8 errors (24.34 KB, patch)
2017-01-09 19:48 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Emilio Pozuelo Monfort 2016-12-12 19:27:33 UTC
pep8 1.7.0 is failing on pygobject 3.22.0 here:

  CHECK  Pyflakes examples gi tests pygtkcompat
  CHECK  PEP8
examples/cairo-demo.py:129:1: E305 expected 2 blank lines after class or function definition, found 1
if __name__ == '__main__':
^
examples/properties.py:16:1: E305 expected 2 blank lines after class or function definition, found 1
GObject.type_register(MyObject)
^
gi/_option.py:371:1: E305 expected 2 blank lines after class or function definition, found 1
make_option = Option
^
gi/types.py:207:1: E305 expected 2 blank lines after class or function definition, found 1
_gobject._install_metaclass(_GObjectMetaBase)
^
gi/overrides/GIMarshallingTests.py:44:1: E305 expected 2 blank lines after class or function definition, found 1
OverridesStruct = override(OverridesStruct)
^
gi/overrides/GIMarshallingTests.py:69:1: E305 expected 2 blank lines after class or function definition, found 1
OverridesObject = override(OverridesObject)
^
gi/overrides/GLib.py:471:1: E305 expected 2 blank lines after class or function definition, found 1
setattr(Variant, 'get_string', get_string)
^
gi/overrides/GLib.py:481:1: E305 expected 2 blank lines after class or function definition, found 0
__all__.append('markup_escape_text')
^
gi/overrides/GLib.py:579:1: E305 expected 2 blank lines after class or function definition, found 1
MainLoop = override(MainLoop)
^
gi/overrides/GLib.py:588:1: E305 expected 2 blank lines after class or function definition, found 1
MainContext = override(MainContext)
^
gi/overrides/GLib.py:637:1: E305 expected 2 blank lines after class or function definition, found 1
Source = override(Source)
^
gi/overrides/GLib.py:652:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('Idle')
^
gi/overrides/GLib.py:665:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('Timeout')
^
gi/overrides/GLib.py:673:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('idle_add')
^
gi/overrides/GLib.py:680:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('timeout_add')
^
gi/overrides/GLib.py:687:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('timeout_add_seconds')
^
gi/overrides/GLib.py:744:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('_io_add_watch_get_args')
^
gi/overrides/GLib.py:752:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('io_add_watch')
^
gi/overrides/GLib.py:833:1: E305 expected 2 blank lines after class or function definition, found 1
IOChannel = override(IOChannel)
^
gi/overrides/GLib.py:847:1: E305 expected 2 blank lines after class or function definition, found 1
PollFD = override(PollFD)
^
gi/overrides/GLib.py:895:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('_child_watch_add_get_args')
^
gi/overrides/GLib.py:903:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('child_watch_add')
^
gi/overrides/GLib.py:909:1: E305 expected 2 blank lines after class or function definition, found 1
get_current_time = deprecated(get_current_time, 'GLib.get_real_time()')
^
gi/overrides/GLib.py:919:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('filename_from_utf8')
^
gi/overrides/GObject.py:354:1: E305 expected 2 blank lines after class or function definition, found 1
Value = override(Value)
^
gi/overrides/GObject.py:364:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('type_from_name')
^
gi/overrides/GObject.py:373:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('type_parent')
^
gi/overrides/GObject.py:387:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_list_ids')
^
gi/overrides/GObject.py:394:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_list_names')
^
gi/overrides/GObject.py:401:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_lookup')
^
gi/overrides/GObject.py:433:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_query')
^
gi/overrides/GObject.py:468:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_handler_block')
^
gi/overrides/GObject.py:489:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_parse_name')
^
gi/overrides/GObject.py:496:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('remove_emission_hook')
^
gi/overrides/GObject.py:506:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_accumulator_first_wins')
^
gi/overrides/GObject.py:513:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('signal_accumulator_true_handled')
^
gi/overrides/Gdk.py:80:1: E305 expected 2 blank lines after class or function definition, found 1
Color = override(Color)
^
gi/overrides/Gdk.py:246:1: E305 expected 2 blank lines after class or function definition, found 1
Event = override(Event)
^
gi/overrides/Gdk.py:315:1: E305 expected 2 blank lines after class or function definition, found 1
DragContext = override(DragContext)
^
gi/overrides/Gio.py:119:1: E305 expected 2 blank lines after class or function definition, found 1
Settings = override(Settings)
^
gi/overrides/Gio.py:238:1: E305 expected 2 blank lines after class or function definition, found 1
DBusProxy = override(DBusProxy)
^
gi/overrides/Gtk.py:56:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('PyGTKDeprecationWarning')
^
gi/overrides/Gtk.py:72:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('_construct_target_list')
^
gi/overrides/Gtk.py:210:1: E305 expected 2 blank lines after class or function definition, found 1
Action = override(Action)
^
gi/overrides/Gtk.py:219:1: E305 expected 2 blank lines after class or function definition, found 1
RadioAction = override(RadioAction)
^
gi/overrides/Gtk.py:386:1: E305 expected 2 blank lines after class or function definition, found 1
ActionGroup = override(ActionGroup)
^
gi/overrides/Gtk.py:402:1: E305 expected 2 blank lines after class or function definition, found 1
UIManager = override(UIManager)
^
gi/overrides/Gtk.py:409:1: E305 expected 2 blank lines after class or function definition, found 1
ComboBox = override(ComboBox)
^
gi/overrides/Gtk.py:418:1: E305 expected 2 blank lines after class or function definition, found 1
Box = override(Box)
^
gi/overrides/Gtk.py:428:1: E305 expected 2 blank lines after class or function definition, found 1
SizeGroup = override(SizeGroup)
^
gi/overrides/Gtk.py:437:1: E305 expected 2 blank lines after class or function definition, found 1
MenuItem = override(MenuItem)
^
gi/overrides/Gtk.py:472:1: E305 expected 2 blank lines after class or function definition, found 1
Builder = override(Builder)
^
gi/overrides/Gtk.py:485:1: E305 expected 2 blank lines after class or function definition, found 1
Window = override(Window)
^
gi/overrides/Gtk.py:571:1: E305 expected 2 blank lines after class or function definition, found 1
Dialog = override(Dialog)
^
gi/overrides/Gtk.py:591:1: E305 expected 2 blank lines after class or function definition, found 1
MessageDialog = override(MessageDialog)
^
gi/overrides/Gtk.py:600:1: E305 expected 2 blank lines after class or function definition, found 1
ColorSelectionDialog = override(ColorSelectionDialog)
^
gi/overrides/Gtk.py:609:1: E305 expected 2 blank lines after class or function definition, found 1
FileChooserDialog = override(FileChooserDialog)
^
gi/overrides/Gtk.py:618:1: E305 expected 2 blank lines after class or function definition, found 1
FontSelectionDialog = override(FontSelectionDialog)
^
gi/overrides/Gtk.py:630:1: E305 expected 2 blank lines after class or function definition, found 1
RecentChooserDialog = override(RecentChooserDialog)
^
gi/overrides/Gtk.py:643:1: E305 expected 2 blank lines after class or function definition, found 1
IconView = override(IconView)
^
gi/overrides/Gtk.py:652:1: E305 expected 2 blank lines after class or function definition, found 1
ToolButton = override(ToolButton)
^
gi/overrides/Gtk.py:659:1: E305 expected 2 blank lines after class or function definition, found 1
IMContext = override(IMContext)
^
gi/overrides/Gtk.py:666:1: E305 expected 2 blank lines after class or function definition, found 1
RecentInfo = override(RecentInfo)
^
gi/overrides/Gtk.py:753:1: E305 expected 2 blank lines after class or function definition, found 1
TextBuffer = override(TextBuffer)
^
gi/overrides/Gtk.py:761:1: E305 expected 2 blank lines after class or function definition, found 1
TextIter = override(TextIter)
^
gi/overrides/Gtk.py:927:1: E305 expected 2 blank lines after class or function definition, found 1
TreeSortable = override(TreeSortable)
^
gi/overrides/Gtk.py:936:1: E305 expected 2 blank lines after class or function definition, found 1
TreeModelSort = override(TreeModelSort)
^
gi/overrides/Gtk.py:1020:1: E305 expected 2 blank lines after class or function definition, found 1
ListStore = override(ListStore)
^
gi/overrides/Gtk.py:1126:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('TreeModelRow')
^
gi/overrides/Gtk.py:1148:1: E305 expected 2 blank lines after class or function definition, found 1
__all__.append('TreeModelRowIter')
^
gi/overrides/Gtk.py:1199:1: E305 expected 2 blank lines after class or function definition, found 1
TreePath = override(TreePath)
^
gi/overrides/Gtk.py:1278:1: E305 expected 2 blank lines after class or function definition, found 1
TreeStore = override(TreeStore)
^
gi/overrides/Gtk.py:1324:1: E305 expected 2 blank lines after class or function definition, found 1
TreeView = override(TreeView)
^
gi/overrides/Gtk.py:1405:1: E305 expected 2 blank lines after class or function definition, found 1
Button = override(Button)
^
gi/overrides/Gtk.py:1414:1: E305 expected 2 blank lines after class or function definition, found 1
LinkButton = override(LinkButton)
^
gi/overrides/Gtk.py:1423:1: E305 expected 2 blank lines after class or function definition, found 1
Label = override(Label)
^
gi/overrides/Gtk.py:1445:1: E305 expected 2 blank lines after class or function definition, found 1
Adjustment = override(Adjustment)
^
gi/overrides/Gtk.py:1458:1: E305 expected 2 blank lines after class or function definition, found 1
Table = override(Table)
^
gi/overrides/Gtk.py:1467:1: E305 expected 2 blank lines after class or function definition, found 1
ScrolledWindow = override(ScrolledWindow)
^
gi/overrides/Gtk.py:1476:1: E305 expected 2 blank lines after class or function definition, found 1
HScrollbar = override(HScrollbar)
^
gi/overrides/Gtk.py:1485:1: E305 expected 2 blank lines after class or function definition, found 1
VScrollbar = override(VScrollbar)
^
gi/overrides/Gtk.py:1496:1: E305 expected 2 blank lines after class or function definition, found 1
Paned = override(Paned)
^
gi/overrides/Gtk.py:1505:1: E305 expected 2 blank lines after class or function definition, found 1
Arrow = override(Arrow)
^
gi/overrides/Gtk.py:1523:1: E305 expected 2 blank lines after class or function definition, found 1
IconSet = override(IconSet)
^
gi/overrides/Gtk.py:1532:1: E305 expected 2 blank lines after class or function definition, found 1
Viewport = override(Viewport)
^
gi/overrides/Gtk.py:1545:1: E305 expected 2 blank lines after class or function definition, found 1
TreeModelFilter = override(TreeModelFilter)
^
gi/overrides/Gtk.py:1562:1: E305 expected 2 blank lines after class or function definition, found 1
stock_lookup = strip_boolean_result(Gtk.stock_lookup)
^
gi/overrides/Pango.py:40:1: E305 expected 2 blank lines after class or function definition, found 1
FontDescription = override(FontDescription)
^
gi/overrides/Pango.py:52:1: E305 expected 2 blank lines after class or function definition, found 1
Layout = override(Layout)
^
tests/test_generictreemodel.py:418:1: E305 expected 2 blank lines after class or function definition, found 1
if __name__ == '__main__':
^
tests/test_interface.py:23:1: E305 expected 2 blank lines after class or function definition, found 0
GObject.type_register(MyUnknown)
^
tests/test_interface.py:35:1: E305 expected 2 blank lines after class or function definition, found 0
GObject.type_register(MyObject)
^
tests/test_iochannel.py:426:1: E305 expected 2 blank lines after class or function definition, found 1
if __name__ == '__main__':
^
tests/test_overrides_gtk.py:79:9: E741 ambiguous variable name 'l'
        l = [x for x in box]
        ^
tests/test_overrides_gtk.py:618:9: E741 ambiguous variable name 'l'
        l = Gtk.stock_lookup('gtk-ok')
        ^
tests/test_properties.py:1140:9: E741 ambiguous variable name 'l'
        l = [GLib.MININT, 42, GLib.MAXINT]
        ^
tests/test_properties.py:1161:9: E741 ambiguous variable name 'l'
        l = [GLib.MININT, 42, GLib.MAXINT]
        ^
tests/test_signal.py:662:1: E305 expected 2 blank lines after class or function definition, found 1
if 'generic-c-marshaller' in GObject.features:
^
pygtkcompat/pygtkcompat.py:102:1: E305 expected 2 blank lines after class or function definition, found 1
_unset = object()
^
Makefile:1202: recipe for target 'check-local' failed
Comment 1 Christoph Reiter (lazka) 2017-01-09 19:48:51 UTC
Created attachment 343193 [details] [review]
Fix new PEP8 errors

Two new errors popped up:

* E305 expected 2 blank lines after class or function definition
* E741 ambiguous variable name
Comment 2 Christoph Reiter (lazka) 2017-01-09 19:50:26 UTC
You can skip pep8 tests using

make check SKIP_PEP8=1

In current master the tests no longer use pep8 by default, see https://git.gnome.org/browse/pygobject/commit/?id=3f68e0a352abc12e1990e82e3134c48f0be2b3c9
Comment 3 Simon Feltman 2017-01-10 04:35:38 UTC
Review of attachment 343193 [details] [review]:

Thanks. Probably no need for code reviewing these types of patches in the future.
Comment 4 Christoph Reiter (lazka) 2017-01-10 14:34:32 UTC
Thanks