MAINT: Apply pre-commit

Remove byte-order-marker pre-commit check as there would be
many adjustments necessary
This commit is contained in:
Martin Thoma
2022-03-05 09:29:23 +01:00
parent f5e33ae38f
commit e64fb6795c
536 changed files with 6267 additions and 5556 deletions

View File

@@ -23,43 +23,48 @@
# Image data. Each top-level element is a row. Each row element
# contains alternating character and blank run lengths.
DATA = [ [60, ],
[1, 12, 26, 9, 12],
[3, 8, 24, 17, 8],
[4, 6, 23, 21, 6],
[4, 6, 22, 12, 5, 6, 5],
[4, 6, 21, 11, 8, 6, 4],
[4, 6, 21, 10, 10, 5, 4],
[4, 6, 21, 9, 11, 5, 4],
[4, 6, 21, 8, 11, 6, 4],
[4, 6, 21, 7, 11, 7, 4],
[4, 6, 21, 6, 11, 8, 4],
[4, 6, 19, 1, 1, 5, 11, 9, 4],
[4, 6, 19, 1, 1, 5, 10, 10, 4],
[4, 6, 18, 2, 1, 6, 8, 11, 4],
[4, 6, 17, 3, 1, 7, 5, 13, 4],
[4, 6, 15, 5, 2, 23, 5],
[1, 29, 5, 17, 8],
[1, 29, 9, 9, 12],
[1, 13, 5, 40, 1],
[1, 13, 5, 40, 1],
[4, 6, 13, 3, 10, 6, 12, 5, 1],
[5, 6, 11, 3, 11, 6, 14, 3, 1],
[5, 6, 11, 3, 11, 6, 15, 2, 1],
[6, 6, 9, 3, 12, 6, 16, 1, 1],
[6, 6, 9, 3, 12, 6, 7, 1, 10],
[7, 6, 7, 3, 13, 6, 6, 2, 10],
[7, 6, 7, 3, 13, 14, 10],
[8, 6, 5, 3, 14, 6, 6, 2, 10],
[8, 6, 5, 3, 14, 6, 7, 1, 10],
[9, 6, 3, 3, 15, 6, 16, 1, 1],
[9, 6, 3, 3, 15, 6, 15, 2, 1],
[10, 6, 1, 3, 16, 6, 14, 3, 1],
[10, 10, 16, 6, 12, 5, 1],
[11, 8, 13, 27, 1],
[11, 8, 13, 27, 1],
[60, ] ]
DATA = [
[
60,
],
[1, 12, 26, 9, 12],
[3, 8, 24, 17, 8],
[4, 6, 23, 21, 6],
[4, 6, 22, 12, 5, 6, 5],
[4, 6, 21, 11, 8, 6, 4],
[4, 6, 21, 10, 10, 5, 4],
[4, 6, 21, 9, 11, 5, 4],
[4, 6, 21, 8, 11, 6, 4],
[4, 6, 21, 7, 11, 7, 4],
[4, 6, 21, 6, 11, 8, 4],
[4, 6, 19, 1, 1, 5, 11, 9, 4],
[4, 6, 19, 1, 1, 5, 10, 10, 4],
[4, 6, 18, 2, 1, 6, 8, 11, 4],
[4, 6, 17, 3, 1, 7, 5, 13, 4],
[4, 6, 15, 5, 2, 23, 5],
[1, 29, 5, 17, 8],
[1, 29, 9, 9, 12],
[1, 13, 5, 40, 1],
[1, 13, 5, 40, 1],
[4, 6, 13, 3, 10, 6, 12, 5, 1],
[5, 6, 11, 3, 11, 6, 14, 3, 1],
[5, 6, 11, 3, 11, 6, 15, 2, 1],
[6, 6, 9, 3, 12, 6, 16, 1, 1],
[6, 6, 9, 3, 12, 6, 7, 1, 10],
[7, 6, 7, 3, 13, 6, 6, 2, 10],
[7, 6, 7, 3, 13, 14, 10],
[8, 6, 5, 3, 14, 6, 6, 2, 10],
[8, 6, 5, 3, 14, 6, 7, 1, 10],
[9, 6, 3, 3, 15, 6, 16, 1, 1],
[9, 6, 3, 3, 15, 6, 15, 2, 1],
[10, 6, 1, 3, 16, 6, 14, 3, 1],
[10, 10, 16, 6, 12, 5, 1],
[11, 8, 13, 27, 1],
[11, 8, 13, 27, 1],
[
60,
],
]
# Assume that the total length of the first element
@@ -73,7 +78,7 @@ print("\n\n")
print("A tribute to the great American artist, Robert Indiana.")
print("His great work will be reproduced with a message of")
print("your choice up to 60 characters. If you can't think of")
print("a message, simple type the word 'love'\n") # (sic)
print("a message, simple type the word 'love'\n") # (sic)
# Get message from user
message = input("Your message, please? ")
@@ -81,7 +86,7 @@ if message == "":
message = "LOVE"
# Repeat the message until we get at least one line's worth
while(len(message) < ROW_LEN):
while len(message) < ROW_LEN:
message += message
# Display image
@@ -89,10 +94,10 @@ print("\n" * 9)
for row in DATA:
print_message = True
position = 0
line_text = ''
line_text = ""
for length in row:
if print_message:
text = message[position:(position + length)]
text = message[position : (position + length)]
print_message = False
else:
text = " " * length
@@ -100,9 +105,8 @@ for row in DATA:
line_text += text
position += length
print(line_text)
print("")
print("")
######################################################################
@@ -146,10 +150,3 @@ print("")
# ((5, ), (1, 1, 2), (2, 1, 1))
#
######################################################################