0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-03-10 00:23:01 +00:00

🎨 Python style tweaks ()

This commit is contained in:
dmitrygribenchuk 2024-07-29 18:41:50 +03:00 committed by GitHub
parent b4dd20c0eb
commit 29469a0615
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 7 deletions
buildroot/share/dwin/bin

View file

@ -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):

View file

@ -49,4 +49,3 @@ if __name__ == '__main__':
except Exception as e:
print('Error: ', e)