Skip to content

Commit

Permalink
Type annotate as IO[bytes], not BinaryIO
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkin committed Nov 9, 2022
1 parent 3dd938e commit 5646e69
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tomli/_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from collections.abc import Iterable
import string
from types import MappingProxyType
from typing import Any, BinaryIO, NamedTuple
from typing import IO, Any, NamedTuple

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


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

0 comments on commit 5646e69

Please sign in to comment.