mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-11 04:07:21 +03:00
Merge pull request #1 from radarhere/bug/compat/numpy1.20
Do not import numpy.typing unless TYPE_CHECKING
This commit is contained in:
commit
ce6fb1279f
|
@ -2,8 +2,9 @@ from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from typing import Any, Protocol, Sequence, TypeVar, Union
|
from typing import TYPE_CHECKING, Any, Protocol, Sequence, TypeVar, Union
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
try:
|
try:
|
||||||
import numpy.typing as npt
|
import numpy.typing as npt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user