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

Make copy methods explicit for linting #3129

Merged
merged 2 commits into from
Sep 29, 2024

Conversation

damusss
Copy link
Member

@damusss damusss commented Sep 28, 2024

I get annoyed by the fact Object().copy() is blue (variable color) while Object().__copy__() is yellow (method color). I think the public API method should be rightfully have the method color along with the magic dunder API.

Am I really making a PR because of a method color in my specific IDE theme? Yes.

@damusss damusss added the Code quality/robustness Code quality and resilience to changes label Sep 28, 2024
@damusss damusss requested a review from a team as a code owner September 28, 2024 20:52
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.

Maybe you don't have to do an invert at all, another option is to be explicit and use the full line in both variants

@damusss
Copy link
Member Author

damusss commented Sep 29, 2024

Maybe you don't have to do an invert at all, another option is to be explicit and use the full line in both variants

Good idea, I just did that.

@damusss damusss changed the title Invert copy and __copy__ because Make copy methods explicit for linting Sep 29, 2024
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 🎉

@damusss damusss added the type hints Type hint checking related tasks label Sep 29, 2024
Copy link
Member

@zoldalma999 zoldalma999 left a comment

Choose a reason for hiding this comment

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

LGTM!

@zoldalma999 zoldalma999 merged commit e9ee4c7 into pygame-community:main Sep 29, 2024
24 checks passed
@damusss damusss added this to the 2.5.2 milestone Sep 29, 2024
@damusss damusss deleted the copy-__copy__-invert branch September 29, 2024 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code quality/robustness Code quality and resilience to changes type hints Type hint checking related tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants