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

Add type hints to shapes #857

Closed
wants to merge 9 commits into from
Closed

Conversation

gran4
Copy link
Contributor

@gran4 gran4 commented May 28, 2023

No description provided.

Copy link
Contributor

@shenjackyuanjie shenjackyuanjie left a comment

Choose a reason for hiding this comment

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

add some gap?

Comment on lines +58 to +63
from typing import (
Union,
Optional,
Tuple,
List
)
Copy link
Contributor

Choose a reason for hiding this comment

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

how about just from typing import Union, Optional, Tuple, List

Copy link
Contributor Author

@gran4 gran4 Jul 13, 2023

Choose a reason for hiding this comment

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

As imports get longer, it is better to put them on separate line. I do not actually know how many are needed to start putting them on separate lines though.(needs more input)

pyglet/shapes.py Show resolved Hide resolved
pyglet/shapes.py Show resolved Hide resolved
@@ -1395,7 +1424,7 @@ def border_color(self, values):
self._update_color()

@property
def color(self):
def color(self) -> Tuple[int, int, int, int]:
Copy link
Contributor

Choose a reason for hiding this comment

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

how about add a type named color rgba

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe

@gran4
Copy link
Contributor Author

gran4 commented Jul 13, 2023

In the ellipse class, segments is not in the docstrings. Is this a bug @benmoran56 or is this something that just needs to be updated?

pyglet/shapes.py Fixed Show fixed Hide fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants