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

Bump mypy from 0.950 to 0.960 #1170

Merged
merged 2 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ sphobjinv==2.2.2
# TYPE CHECKING #
#################

mypy==0.950
mypy==0.960
pyright==1.1.249

#######################
Expand Down
28 changes: 0 additions & 28 deletions hikari/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,34 +424,6 @@ def from_tuple_string(cls, tuple_str: str, /) -> Color:
else:
return cls.from_rgb(_to_rgb_int(r, "red"), _to_rgb_int(g, "green"), _to_rgb_int(b, "blue"))

# Partially chose to override these as the docstrings contain typos according to Sphinx.
@classmethod
def from_bytes(
cls,
bytes_: typing.Union[typing.Iterable[typing.SupportsIndex], typing.SupportsBytes],
byteorder: typing.Literal["little", "big"],
*,
signed: bool = True,
) -> Color:
"""Convert the bytes to a `Color`.

Parameters
----------
bytes_ : typing.Iterable[builtins.int]
A iterable of int byte values.
byteorder : builtins.str
The endianness of the value represented by the bytes.
Can be `"big"` endian or `"little"` endian.
signed : builtins.bool
Whether the value is signed or unsigned.

Returns
-------
Color
The Color object.
"""
return Color(int.from_bytes(bytes_, byteorder, signed=signed))

@classmethod
def of(cls, value: Colorish, /) -> Color:
"""Convert the value to a `Color`.
Expand Down