Closed Kn4ughty closed 6 months ago
The CI fails I'm seeing so far are concerning (not to do with your code though)
The error message is missing spaces in necessary locations:
>>> a.align = -1
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
pygame.error: font.align must be FONT_LEFT, FONT_CENTER, orFONT_RIGHT.
>>> a.align = "hello"
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: font.align must be an integer.Must correspond with FONT_LEFT, FONT_CENTER, or FONT_RIGHT
Hello, while using font.align in a project, I passed it bad data, and the error message was not clear, and I had to read the source code to work out what the error message actually meant. The problem is when you pass something that is not FONT_LEFT, FONT_CENTER, or FONT_RIGHT it says it must be an integer, but to the end user it might appear that FONT_LEFT is not an integer, and they might be confused about what they need to parse.
I had a function that drew some text, and it was something like this
Then when i passed it the wrong type, the error message said it must be an integer, and I thought "I thought it was pygame.FONT_LEFT!"
I hope that this change makes it more clear to any users in the future.