4141# stdlib
4242import os
4343import pathlib
44- import typing
4544from decimal import Decimal
46- from json import JSONDecoder , JSONEncoder
47- from typing import TYPE_CHECKING , Any , Callable , Dict , List , Optional , Tuple , Type , Union
45+ from typing import TYPE_CHECKING , Any , Callable , Dict , List , Optional , Tuple , Type , TypeVar , Union
4846
4947# 3rd party
5048from typing_extensions import Protocol , runtime_checkable
5351import domdf_python_tools
5452
5553if TYPE_CHECKING or domdf_python_tools .__docs : # pragma: no cover
54+ # stdlib
55+ from json import JSONDecoder , JSONEncoder
56+
5657 # 3rd party
5758 from pandas import DataFrame , Series
5859
6364 JSONEncoder .__module__ = "json"
6465
6566#: .. versionadded:: 1.0.0
66- FrameOrSeries = typing . TypeVar ("FrameOrSeries" , "Series" , "DataFrame" )
67+ FrameOrSeries = TypeVar ("FrameOrSeries" , "Series" , "DataFrame" )
6768
6869__all__ = [
6970 "PathLike" ,
9293.. seealso:: :py:obj:`domdf_python_tools.typing.PathType`
9394"""
9495
95- PathType = typing . TypeVar ("PathType" , str , pathlib .Path , os .PathLike )
96+ PathType = TypeVar ("PathType" , str , pathlib .Path , os .PathLike )
9697"""
9798Type variable for objects that represent filesystem paths.
9899
@@ -138,7 +139,7 @@ def dumps(
138139 ensure_ascii : bool = ...,
139140 check_circular : bool = ...,
140141 allow_nan : bool = ...,
141- cls : Optional [Type [JSONEncoder ]] = ...,
142+ cls : Optional [Type [" JSONEncoder" ]] = ...,
142143 indent : Union [None , int , str ] = ...,
143144 separators : Optional [Tuple [str , str ]] = ...,
144145 default : Optional [Callable [[Any ], Any ]] = ...,
@@ -165,7 +166,7 @@ def dumps(
165166 def loads (
166167 s : Union [str , bytes ],
167168 * ,
168- cls : Optional [Type [JSONDecoder ]] = ...,
169+ cls : Optional [Type [" JSONDecoder" ]] = ...,
169170 object_hook : Optional [Callable [[Dict [Any , Any ]], Any ]] = ...,
170171 parse_float : Optional [Callable [[str ], Any ]] = ...,
171172 parse_int : Optional [Callable [[str ], Any ]] = ...,
0 commit comments