Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.11/site-packages/rfc3986/_typing_compat.py: 50%

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

6 statements  

1import sys 

2import typing as t 

3 

4__all__ = ("Self",) 

5 

6if sys.version_info >= (3, 11): # pragma: no cover 

7 from typing import Self 

8elif t.TYPE_CHECKING: 

9 from typing_extensions import Self 

10else: # pragma: no cover 

11 

12 class _PlaceholderMeta(type): 

13 # This is meant to make it easier to debug the presence of placeholder 

14 # classes. 

15 def __repr__(self): 

16 return f"placeholder for typing.{self.__name__}" 

17 

18 class Self(metaclass=_PlaceholderMeta): 

19 """Placeholder for "typing.Self"."""