Skip to content

Conversation

tharvik
Copy link
Contributor

@tharvik tharvik commented Jul 29, 2016

Anything more to say?

# Stubs for colorsys

from typing import Tuple

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add the constants ONE_SIXTH, ONE_THIRD, TWO_THIRD. (All floats)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These are undocumented, seems internal (not in __all__, nor having description); it was added in fc55ed0 if really wanted.

TWO_THIRD = ... # type: float

# TODO undocumented, should only work with float
def rgb_to_yiq(r: Union[float, complex], g: Union[float, complex], b: Union[float, complex]) -> Tuple[float, float, float]: ...
Copy link
Contributor

Choose a reason for hiding this comment

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

mypy allows you to use the shortcut complex for Union[float, complex], I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, seems to work, updated in f9413c4.

@matthiaskramm matthiaskramm merged commit 4172300 into python:master Jul 29, 2016
@tharvik tharvik deleted the add_colorsys branch July 29, 2016 15:02
hswong3i pushed a commit to alvistack/python-typeshed that referenced this pull request May 25, 2025
Fixes python#419

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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.

2 participants