PEP8 Cleanup and disable long line check of PEP for CC
This commit is contained in:
parent
bf47bd98d1
commit
74acd55b6a
|
@ -6,6 +6,9 @@ engines:
|
|||
enabled: true
|
||||
pep8:
|
||||
enabled: true
|
||||
checks:
|
||||
E501:
|
||||
enabled: false
|
||||
ratings:
|
||||
paths:
|
||||
- "**.py"
|
||||
|
|
10
oxm.pyw
10
oxm.pyw
|
@ -16,14 +16,16 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
# USA.
|
||||
#
|
||||
# -----------------------------------------------------------------------
|
||||
import os
|
||||
#FIXME: rather pathetic fix for ubuntu to show menus - GTK3 migration should fix this
|
||||
os.environ['UBUNTU_MENUPROXY']='0'
|
||||
import gtk
|
||||
import sys
|
||||
import os
|
||||
# FIXME: rather pathetic fix for ubuntu to show menus - GTK3 migration should
|
||||
# fix this
|
||||
os.environ['UBUNTU_MENUPROXY'] = '0'
|
||||
|
||||
sys.path.append('./src')
|
||||
|
||||
|
|
3
setup.py
3
setup.py
|
@ -27,7 +27,8 @@ setup(
|
|||
'Environment :: X11 Applications :: GTK',
|
||||
'Intended Audience :: Information Technology',
|
||||
'Intended Audience :: System Administrators',
|
||||
'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)',
|
||||
'License :: OSI Approved :: GNU General Public License v2 or '
|
||||
'later (GPLv2+)',
|
||||
'Natural Language :: English',
|
||||
'Operating System :: POSIX :: Linux',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
# Original Author: John Finlay <finlay at moeraki.com>
|
||||
# http://www.daa.com.au/pipermail/pygtk/2004-September/008685.html
|
||||
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
import gtk
|
||||
import gobject
|
||||
import pygtk
|
||||
pygtk.require('2.0')
|
||||
|
||||
|
||||
PAD = 3
|
||||
|
||||
|
@ -13,13 +14,14 @@ PAD = 3
|
|||
class PixbufTextCellRenderer(gtk.GenericCellRenderer):
|
||||
|
||||
__gproperties__ = {
|
||||
"pixbuf": (gobject.TYPE_PYOBJECT, "Pixbuf",
|
||||
"pixbuf": (gobject.TYPE_PYOBJECT, "Pixbuf",
|
||||
"Pixbuf image", gobject.PARAM_READWRITE),
|
||||
"text": (gobject.TYPE_STRING, "Text", "Text string", None,
|
||||
gobject.PARAM_READWRITE),
|
||||
'background': (gtk.gdk.Color, 'Background', 'The background color', gobject.PARAM_READWRITE)
|
||||
'background': (gtk.gdk.Color, 'Background',
|
||||
'The background color', gobject.PARAM_READWRITE)
|
||||
}
|
||||
|
||||
|
||||
def __init__(self):
|
||||
self.__gobject_init__()
|
||||
self.prend = gtk.CellRendererPixbuf()
|
||||
|
@ -35,13 +37,14 @@ class PixbufTextCellRenderer(gtk.GenericCellRenderer):
|
|||
def update_properties(self):
|
||||
self.trend.set_property('text', self.get_property('text'))
|
||||
self.prend.set_property('pixbuf', self.get_property('pixbuf'))
|
||||
self.prend.set_property('cell-background-gdk', self.get_property('background'))
|
||||
self.prend.set_property('cell-background-gdk',
|
||||
self.get_property('background'))
|
||||
return
|
||||
|
||||
def on_render(self, window, widget, background_area,
|
||||
cell_area, expose_area, flags):
|
||||
self.update_properties()
|
||||
#ypad = self.get_property('ypad')
|
||||
# ypad = self.get_property('ypad')
|
||||
px, py, pw, ph = self.prend.get_size(widget, cell_area)
|
||||
px += cell_area.x
|
||||
prect = (px, cell_area.y, pw, ph)
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
|
||||
|
|
@ -115,4 +115,4 @@ capabilities_text = {
|
|||
"XenServer daemon process details"],
|
||||
"xenserver-domains": ["XenServer domains list",
|
||||
"List of the guest VMs installed onto the server "
|
||||
"and their current states"]}
|
||||
"and their current states"]}
|
||||
|
|
|
@ -103,4 +103,4 @@ def install_thread_excepthook():
|
|||
|
||||
if __name__ == "__main__":
|
||||
install_thread_excepthook()
|
||||
main()
|
||||
main()
|
||||
|
|
|
@ -81,4 +81,4 @@ def get_msg(msg_key):
|
|||
else:
|
||||
msg = False
|
||||
|
||||
return msg
|
||||
return msg
|
||||
|
|
Loading…
Reference in New Issue