Skip to content

Conversation

@ankith26
Copy link
Member

A bunch of minor general typing fixes and enhancements

  • Ellipsis is allowed in rect subscripted. Fixed the typing here, and also updated the usage in pixelarray to the more modern way.
  • Enhanced dict typing with TypedDict where possible. This will convey more typing info to users.
  • Fixed bare tuple usage with type info
  • In freetype, most methods that take text also accept None values, so fixed that. Also set_default_resolution can be called without arguments (in which case it takes the value 0)

@ankith26 ankith26 requested a review from a team as a code owner January 20, 2025 14:15
@yunline yunline added type hints Type hint checking related tasks freetype pygame.freetype labels Jan 22, 2025
Copy link
Member

@damusss damusss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually great typehint enhancements, Nice :)

Copy link
Member

@MyreMylar MyreMylar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! 👍

@MyreMylar MyreMylar merged commit cc1d859 into main Jan 26, 2025
24 checks passed
@ankith26 ankith26 deleted the ankith26-new-typing-2 branch January 27, 2025 06:21
@ankith26 ankith26 added this to the 2.5.3 milestone Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

freetype pygame.freetype type hints Type hint checking related tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants