HexEdit/HexEditWidget.py

changeset 5587
ea526b78ee6c
parent 5389
9b1c800daff3
child 5624
cdd346d8858b
diff -r 0e5421d679e7 -r ea526b78ee6c HexEdit/HexEditWidget.py
--- a/HexEdit/HexEditWidget.py	Tue Mar 07 18:46:09 2017 +0100
+++ b/HexEdit/HexEditWidget.py	Tue Mar 07 18:53:18 2017 +0100
@@ -9,7 +9,7 @@
 
 from __future__ import unicode_literals, division
 try:
-    chr = unichr       # __IGNORE_EXCEPTION__
+    chr = unichr       # __IGNORE_EXCEPTION__ __IGNORE_WARNING_M131__
 except NameError:
     pass
 
@@ -706,18 +706,18 @@
         self.__undoStack.insertByteArray(pos, bytearray(byteArray))
         self.__refresh()
     
-    def replaceByteArray(self, pos, len, byteArray):
+    def replaceByteArray(self, pos, length, byteArray):
         """
         Public method to replace bytes.
         
         @param pos position to replace the bytes at
         @type int
-        @param len amount of bytes to replace
+        @param length amount of bytes to replace
         @type int
         @param byteArray bytes to replace with
         @type bytearray or QByteArray
         """
-        self.__undoStack.overwriteByteArray(pos, len, bytearray(byteArray))
+        self.__undoStack.overwriteByteArray(pos, length, bytearray(byteArray))
         self.__refresh()
     
     def cursorPositionFromPoint(self, point):
@@ -1426,9 +1426,10 @@
                             3 * self.__pxCharWidth,
                             self.__pxCharHeight)
                     painter.fillRect(r, c)
-                    hex = chr(self.__hexDataShown[(bPosLine + colIdx) * 2]) + \
+                    hexStr = \
+                        chr(self.__hexDataShown[(bPosLine + colIdx) * 2]) + \
                         chr(self.__hexDataShown[(bPosLine + colIdx) * 2 + 1])
-                    painter.drawText(pxPosX, pxPosY, hex)
+                    painter.drawText(pxPosX, pxPosY, hexStr)
                     pxPosX += 3 * self.__pxCharWidth
                     
                     # render ascii value

eric ide

mercurial