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

Minor fixes and changes to geometry.pyi stub file #3172

Merged
merged 6 commits into from
Oct 17, 2024

Conversation

aatle
Copy link
Contributor

@aatle aatle commented Oct 13, 2024

Improved some stuff.

  • Change has-attribute protocols to use properties (to fix typing problems)
  • Remove type unions _CanBeCircle, _CanBeLine. These internal types provide little benefit, and a similar union _CanBeRect was removed previously.
    • This has one minor effect: the circle attribute can now be another object with a circle attribute, recursively (which reflects actual implementation)
  • Rename _CircleValue -> _CircleLike, _LineValue -> _LineLike, to be consistent with RectLike, adhere to naming scheme.
  • Fix name typo _HasCirclettribute -> _HasCircleAttribute
  • Remove redundant Vector2 type from _CanBeCollided. Vector2 is clearly implied by Point.
  • Mark Circle.contains(shape) parameter positional-only
  • Format

@aatle aatle requested a review from a team as a code owner October 13, 2024 06:49
@damusss damusss added the type hints Type hint checking related tasks label Oct 13, 2024
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.

LGTM, thanks

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 🥳

@ankith26 ankith26 added this to the 2.5.3 milestone Oct 17, 2024
@ankith26 ankith26 merged commit 9218eb2 into pygame-community:main Oct 17, 2024
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type hints Type hint checking related tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants