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

Fix Optional typehint usage in typehint files #2678

Merged
merged 2 commits into from Aug 18, 2021
Merged

Conversation

ankith26
Copy link
Contributor

@ankith26 ankith26 commented Aug 16, 2021

Fixed Optional typehint usage. According to docs (https://docs.python.org/3/library/typing.html#typing.Optional), an Optional typehint signifies a typehint that can be None, but not an argument that is optional. This PR is a quickfix to this typing issue.

Also runs black on all modified files, for consistent code formatting with the rest of the project that uses the same

Co-authored with @zoldalma999 in a code collab

Co-Authored-By: zoldalma999 <46655437+zoldalma999@users.noreply.github.com>
buildconfig/pygame-stubs/color.pyi Outdated Show resolved Hide resolved
buildconfig/pygame-stubs/mask.pyi Outdated Show resolved Hide resolved
buildconfig/pygame-stubs/mixer.pyi Show resolved Hide resolved
buildconfig/pygame-stubs/mixer.pyi Show resolved Hide resolved
Copy link
Contributor

@Starbuck5 Starbuck5 left a comment

Choose a reason for hiding this comment

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

Alright, this looks good to me! 🎉

Copy link
Contributor

@MightyJosip MightyJosip left a comment

Choose a reason for hiding this comment

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

Nice. Thank you 👍

@ankith26 ankith26 merged commit 34acc0e into main Aug 18, 2021
@ankith26 ankith26 deleted the optional-hints-fix branch August 18, 2021 09:35
@illume illume added the types Type hint checking related tasks label Aug 21, 2021
@illume illume added this to the 2.0.2 milestone Aug 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
types Type hint checking related tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants