Skip to content

Commit 5646e69

Browse files
committed
Type annotate as IO[bytes], not BinaryIO
1 parent 3dd938e commit 5646e69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tomli/_parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from collections.abc import Iterable
88
import string
99
from types import MappingProxyType
10-
from typing import Any, BinaryIO, NamedTuple
10+
from typing import IO, Any, NamedTuple
1111

1212
from ._re import (
1313
RE_DATETIME,
@@ -54,7 +54,7 @@ class TOMLDecodeError(ValueError):
5454
"""An error raised if a document is not valid TOML."""
5555

5656

57-
def load(__fp: BinaryIO, *, parse_float: ParseFloat = float) -> dict[str, Any]:
57+
def load(__fp: IO[bytes], *, parse_float: ParseFloat = float) -> dict[str, Any]:
5858
"""Parse TOML from a binary file object."""
5959
b = __fp.read()
6060
try:

0 commit comments

Comments
 (0)