Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/imageio-2.35.1-py3.8.egg/imageio/typing.py: 78%

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

9 statements  

1from io import BytesIO 

2from typing import Union, BinaryIO 

3from pathlib import Path 

4 

5try: 

6 from numpy.typing import ArrayLike 

7except ImportError: 

8 # numpy<1.20 fall back to using ndarray 

9 from numpy import ndarray as ArrayLike 

10 

11ImageResource = Union[str, bytes, BytesIO, Path, BinaryIO] 

12 

13 

14__all__ = [ 

15 "ArrayLike", 

16 "ImageResource", 

17]