[sugar] [PATCH] sugar pylint (vol2)
Simon Schampijer
simon
Tue Apr 22 08:47:38 EDT 2008
Hi,
two more patches for pylint. One thing that I have not solved yet in the
lint_intro patch is the problem that pylint is not aware of members of
the window class. I think that is the case because the gtk.gdk.window is
only available when the window is realized.
- window xid: shell/intro/glive.py
- Class 'window' has no 'xid' member
- other examples: set_type_hint, set_accept_focus...
Another issue I have quite often is the one of unused variables due to
returned tuples and lists where not all the variables are used in the code.
examaple from src/view/frame/clipboardpanelwindow.py:
scheme, netloc, path, parameters, query, fragment = urlparse.urlparse(uri)
on_disk = (scheme == 'file')
What about doing here, or any other options?
scheme = urlparse.urlparse(uri)[0]
Best,
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lint_intro.patch
Type: text/x-patch
Size: 6715 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080422/aeb848e9/attachment-0002.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lint_model.patch
Type: text/x-patch
Size: 19949 bytes
Desc: not available
Url : http://lists.laptop.org/pipermail/sugar/attachments/20080422/aeb848e9/attachment-0003.bin
More information about the Sugar-devel
mailing list