Files
typeshed/stdlib
Kyle Altendorf 9052674aa8 bytes.fromhex() returns cls instance, not bytes (#6201)
```console
$ cat y.py
import typing

class MyBytes(bytes):
    pass


x = MyBytes.fromhex("abcd")
if typing.TYPE_CHECKING:
    reveal_type(x)
else:
    print(x.__class__.__name__)
```

```console
$ for v in 3.6 3.7 3.8 3.9 3.10; do echo -n "$v: " ; python$v y.py; done
3.6: MyBytes
3.7: MyBytes
3.8: MyBytes
3.9: MyBytes
3.10: MyBytes
```

```console
$ venv/bin/mypy y.py
y.py:9: note: Revealed type is "builtins.bytes"
```
2021-10-25 16:28:33 -07:00
..
2021-05-06 18:57:33 +03:00
2021-08-11 20:49:30 -07:00
2021-04-14 19:14:07 -07:00
2021-09-10 15:27:24 -07:00
2021-10-25 12:52:02 +02:00
2021-09-03 13:02:11 +02:00