Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/yarl/_quoting.py: 75%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1import os
2import sys
3from typing import TYPE_CHECKING
5__all__ = ("_Quoter", "_Unquoter")
8NO_EXTENSIONS = bool(os.environ.get("YARL_NO_EXTENSIONS")) # type: bool
9if sys.implementation.name != "cpython":
10 NO_EXTENSIONS = True
13if TYPE_CHECKING or NO_EXTENSIONS:
14 from ._quoting_py import _Quoter, _Unquoter
15else:
16 try:
17 from ._quoting_c import _Quoter, _Unquoter
18 except ImportError: # pragma: no cover
19 from ._quoting_py import _Quoter, _Unquoter # type: ignore[assignment]