Skip to content
New issue

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

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

Already on GitHub? # to your account

updated 'in' operator for sys.platform linux check #3246

Merged

Conversation

sonotopes
Copy link
Contributor

As Pygame currently uses CPython 3.8>=, the 'in' operator in the sys.platform check of get_backends() could be considered unnecessary, as no major version of Linux will be returned when accessing sys.platform. According to Python documentation, as of 3.3, sys.platform will only return the string, 'linux' (lowercased). Therefore, the == operator could potentially be more appropriate. Just a thought.

@sonotopes sonotopes requested a review from a team as a code owner November 29, 2024 02:10
@yunline yunline added the Code quality/robustness Code quality and resilience to changes label Nov 29, 2024
Copy link
Contributor

@bilhox bilhox left a comment

Choose a reason for hiding this comment

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

Fair changes, thanks for your contribution !

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 contributing! 🎉

@ankith26 ankith26 added this to the 2.5.3 milestone Nov 29, 2024
@ankith26 ankith26 merged commit 1c2e752 into pygame-community:main Nov 29, 2024
23 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Code quality/robustness Code quality and resilience to changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants