Back to Ruff

Bytes literals

crates/ty_python_semantic/resources/mdtest/literal/bytes.md

0.15.12274 B
Original Source

Bytes literals

Simple

py
reveal_type(b"t" b"y")  # revealed: Literal[b"ty"]  # fmt:skip
reveal_type(b"hello")  # revealed: Literal[b"hello"]
reveal_type(b"world" + b"!")  # revealed: Literal[b"world!"]
reveal_type(b"\xff\x00")  # revealed: Literal[b"\xff\x00"]