mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-03-10 00:23:01 +00:00
🎨 Python style tweaks (#27312)
This commit is contained in:
parent
b4dd20c0eb
commit
29469a0615
2 changed files with 6 additions and 7 deletions
buildroot/share/dwin/bin
|
@ -118,14 +118,14 @@ class DWIN_ICO_File():
|
|||
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)
|
||||
|
@ -201,9 +201,9 @@ class DWIN_ICO_File():
|
|||
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):
|
||||
|
|
|
@ -49,4 +49,3 @@ if __name__ == '__main__':
|
|||
|
||||
except Exception as e:
|
||||
print('Error: ', e)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue