Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-functional python code style fixes #27733

Open
wants to merge 2 commits into
base: bugfix-2.1.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions buildroot/share/dwin/bin/DWIN_ICO.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ def _splitEntryData(self, infile, outDir):
count += 1

def createFile(self, iconDir, filename):
'''Create a new .ico file from the contents of iconDir.
"""Create a new .ico file from the contents of iconDir.

The contents of iconDir are processed to get image
resolution, and a new entry is created for each.

Each filename must have a leading number followed by a
dash, which is the icon index. E.g., "071-ICON_StepX.jpg".
'''
"""
self.entries = [Entry() for i in range(0,256)]
# 1. Scan icon directory and record all valid files
print('Scanning icon directory', iconDir)
Expand All @@ -140,7 +140,7 @@ def createFile(self, iconDir, filename):
if not (0 <= index <= 255):
print('...Ignoring invalid index on', dirEntry.path)
continue
#dirEntry.path is iconDir/name
# dirEntry.path is iconDir/name
w,h = getJpegResolution(dirEntry.path)
length = dirEntry.stat().st_size
e = self.entries[index]
Expand Down Expand Up @@ -171,7 +171,7 @@ def _updateHeaderOffsets(self):
continue
e.offset = offset
offset += e.length
#print('%03d: (%d x %d) len=%d off=%d' %
# print('%03d: (%d x %d) len=%d off=%d' %
# (i, e.width, e.height, e.length, e.offset))

def _combineAndWriteIcoFile(self, filename):
Expand Down Expand Up @@ -201,9 +201,9 @@ def _getFileContents(self, filename, length):
return contents

class Entry():
'''Entry objects record resolution and size information
"""Entry objects record resolution and size information
about each icon stored in an ICO file.
'''
"""
__slots__ = ('width', 'height', 'offset', 'length', 'filename')

def __init__(self, w=0, h=0, length=0, offset=0, filename=None):
Expand Down
1 change: 0 additions & 1 deletion buildroot/share/dwin/bin/makeIco.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,3 @@

except Exception as e:
print('Error: ', e)

Loading