Skip to content

Commit

Permalink
Import Callable from typing
Browse files Browse the repository at this point in the history
  • Loading branch information
hukkin committed Oct 21, 2021
1 parent 4996ea3 commit 8b804d3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tomli/_parser.py
@@ -1,9 +1,9 @@
from __future__ import annotations

from collections.abc import Callable, Iterable
from collections.abc import Iterable
import string
from types import MappingProxyType
from typing import Any, BinaryIO, NamedTuple, Tuple
from typing import Any, BinaryIO, Callable, NamedTuple, Tuple
import warnings

from tomli._re import (
Expand Down Expand Up @@ -46,9 +46,11 @@
)

# Type annotations
Pos = int
# Use `collections.abc.Callable` when min Python is 3.9
ParseFloat = Callable[[str], Any]
# use `tuple` when min Python is 3.9
Key = Tuple[str, ...]
Pos = int


class TOMLDecodeError(ValueError):
Expand Down

0 comments on commit 8b804d3

Please sign in to comment.