Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs of Surface.get_(f)rect() and (F)Rect.move_to() #2901

Merged

Conversation

damusss
Copy link
Member

@damusss damusss commented Jun 2, 2024

As you can see from the changed docs I think I made them clearer. I didn't know you could pass size kwargs myself for a long time. The docs technically didn't hide them, but it's very unclear that they do that. Why?

  • Surface.get_rect -> it says the rect will have the surface dimentions, so intuitively you'd think you can't resize it
  • Rect.move_to -> the name and the docs only mentions that the rect will be moved to a new position, not that it will also resize it.

Yes, they both say that the kwargs should match the attributes and they don't say those are not allowed, but I think this small update makes it more clear.

@damusss damusss requested a review from a team as a code owner June 2, 2024 12:34
Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the PR 😎

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.

LGTM 👍

@Starbuck5 Starbuck5 added the docs label Jun 2, 2024
@ankith26
Copy link
Member

ankith26 commented Jun 3, 2024

Merging this PR in now.

PS: we are on a merge freeze for the 2.5.0 release, so when this PR is merged onto main it will get released in the upcoming 2.5.1 release

@ankith26 ankith26 added this to the 2.5.1 milestone Jun 3, 2024
@ankith26 ankith26 merged commit 70898d9 into pygame-community:main Jun 3, 2024
3 checks passed
@damusss damusss deleted the get_rect-move_to-docs-update branch June 3, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants