KEMBAR78
[mypyc] Add bytearray support (#10891) by sthagen · Pull Request #102 · sthagen/python-mypy · GitHub
Skip to content

Conversation

@sthagen
Copy link
Owner

@sthagen sthagen commented Jul 30, 2021

bytearray is treated as a subtype of bytes by mypy, even though they behave
differently in some cases. We keep this design and accept bytearrays when
the static type of a value is bytes.

Have you read the Contributing Guidelines?

(Once you have, delete this section. If you leave it in, your PR may be closed without action.)

Description

(Explain how this PR changes mypy.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

bytearray is treated as a subtype of bytes by mypy, even though they behave 
differently in some cases. We keep this design and accept bytearrays when 
the static type of a value is bytes.
@sthagen sthagen merged commit f709b8e into sthagen:master Jul 30, 2021
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